In this video, I have shown how can we use illuminate/database package outside laravel mvc framework. How can we extend the eloquent model. How can we use composer for autoloading php file. All source code will be available in following link
https://github.com/polodev/illuminate...
making a website with illuminate database package outside laravel
visit package on https://packagist.org/packages/illumi... page
installing illuminate/database package with dependancy
composer require illuminate/database illuminate/events
adding db.php file to composer.json file to autolaod and doing composer dump-autoload command
"autoload": {
"files": ["db.php"]
}
creating table using schema builder
Relation between 2 models is, subject belongs to Department and Department has many subjects.
adding model folder to composer.json file to autolaod all models and doing composer dump-autoload command
"autoload": {
"classmap": ["Models"]
}
How to run this source code in your pc
I hope you already have npm(node package manager) and composer install in your pc. If its not your case just download node js from https://nodejs.org/en/ and download composer from https://getcomposer.org/doc/00-intro.....
Once you have installed both software in your pc you just do following command in terminal.
To install jquery, bootstrap, popper.js
npm install
To install illuminate/database illuminate/events
composer install
Login to your mysql account and make a database name college
Now serve using any server. You can use php mini server like mine.
php -S localhost:8000
Here 8000 could be any 4 digit
Смотрите видео php tutorial - Using illuminate/database, eloquent model and composer outside laravel онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь polodev 07 Февраль 2018, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 8,86 раз и оно понравилось 13 людям.