Source: https://github.com/juanmvega/my-booking
Tutorial: Laravel Tutorial
- Clone the app
1234567teddy@teddy-K43SJ:~/Documents/works/laravel$ git clone https://github.com/juanmvega/my-booking.gitCloning into 'my-booking'...remote: Counting objects: 6233, done.remote: Total 6233 (delta 0), reused 0 (delta 0), pack-reused 6233Receiving objects: 100% (6233/6233), 6.70 MiB | 1.28 MiB/s, done.Resolving deltas: 100% (1576/1576), done.Checking connectivity... done.
Check the files in /laravel/my-booking/ directory! - Go to the the directory and use composer to install the dependencies
12345678910teddy@teddy-K43SJ:~/Documents/works/laravel$ cd my-booking/teddy@teddy-K43SJ:~/Documents/works/laravel/my-booking$ composer installYou are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebugLoading composer repositories with package informationInstalling dependencies (including require-dev) from lock fileNothing to install or updateGenerating autoload files> Illuminate\Foundation\ComposerScripts::postInstall> php artisan optimizeGenerating optimized class loader
‘Vendor’ directory is already exist! so the dependencies are already downloaded! - Create a new database ‘demo_data’ via phpmyadmin
- Create a new table ‘demo_data’
123456789101112CREATE TABLE IF NOT EXISTS `demo_data` (`roomid` int(10) unsigned NOT NULL AUTO_INCREMENT,`name` varchar(50) NOT NULL,`roomname` varchar(50) NOT NULL,`features` tinytext NOT NULL,`baseprice` float NOT NULL,`occupancy` tinyint(4) NOT NULL,`deleted_at` datetime NOT NULL,`created_at` datetime NOT NULL,`updated_at` datetime NOT NULL,PRIMARY KEY (`roomid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - Edit .env file to add the database setting
- Modify the files permission in /storage/ and /bootstrap/ directories
12teddy@teddy-K43SJ:~/Documents/works/laravel/my-booking$ sudo chmod -R 777 storage/teddy@teddy-K43SJ:~/Documents/works/laravel/my-booking$ sudo chmod -R 777 bootstrap/ - Test the app in http://localhost/works/laravel/my-booking/public/rooms
WORKS!!!
- Something still not correct. in /resources/views/layout/layout.blade.php, I still have to add jQuery library because bootstrap need jQuery!
1234...<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script><html>
Also I have to change many links on many blade files (index.blade.php, create.blade.php, show.blade.php, edit.blade.php) that those not correct. Change from ‘/laravel/’ to ‘/works/laravel/my-booking/’. Also change from ‘http://tutorials.juanmvega.com/laravel/’ to ‘/works/laravel/my-booking/’.