RESTful backend with Laravel 5.3 and Angular 2 as frontend
-
The ng2 directory hosts the Angular 2 app
-
Other directories/files in the project root belongs to Laravel (5.3)
-
Some of the config files are not in the repo since they are kept as is out-of-the-box.
-
Config your database:
./config/database.php ./env - Database schema is as follows:
Schema::create('employee', function (Blueprint $table) { $table->increments('id'); //primary key + auto increment $table->string('firstname'); $table->string('lastname'); $table->date('DOB'); $table->string('description',100); $table->timestamps(); //'created_at' 'updated_at' cols- Perform migration:
php artisan migrate- EmployeeTableSeeder defines the seeds for the database. For initial seeding:
php artisan db:seed --class="EmployeeTableSeeder"- Now run
php artisan servein the project root and you will be Up and Running !!