Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

RatulHasan/laravel-crud

Repository files navigation

CRUD System by laravel

Laravel CRUD system for laravel developers'. It's easy to install and run.

Installing

Run create-project command with composer to install this project.

Here is the full installation command -

composer create-project ratulhasan/laravel-crud:dev-master

Now Change this options bellow within your .env,

To rename .env.example, run

php -r "copy('.env.example', '.env');"
DB_DATABASE=homestead // your database name 
DB_USERNAME=homestead // your database user name 
DB_PASSWORD=secret // your database password 
cd to/your/project/dir

Give this command again:

composer update

Change your .env.example to .env and make necessary changes in that file especially database configurations to avoid db error. Then

php artisan key:generate

run project.

in Table Name (input) give your database table name & hit save. 1 Controller should create accourding to your given table name 1 view folder should create accourding to your given table name A CRUD routes should create accourding to your given table name in web.php

To check

Url: http://path/to/root/lara-crud/table_name

You should see a list page.

Now add this to your nav

/laravel-crud/resources/views/admin/pages/navbar.blade.php

For Linux user

The stream or file "/root/path/lara-crud/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

if see this kind of Permission denied error

just run this command from outside your project root directory to permit read and write

sudo chmod -R 777 [directory_name]

For enable .htaccess

sudo gedit /etc/apache2/apache2.conf

Then find the line where there is

<Directory /var/www/>

 Options Indexes FollowSymLinks
 
 AllowOverride None
 
 Require all granted

replace "None" with "All"

AllowOverride All

Happy coding

Author

Ratul Hasan | Email

License

This project is licensed under the MIT License - see the LICENSE.md file for details