Skip to content

mrcat323/lara-practice

Repository files navigation

lara-practice

Project for practicing Laravel + Vue JS knowledge. The project is very simple, there've been included simple CRUD stuff without AUTH or something. The APP is reactive with Vue, Vue just made that reactive, cool and fast.

Get started

First you have to just clone the repository to your machine saying:

git clone https://github.com/mrcat323/lara-practice

Configuring

First generate a key:

php artisan key:generate

Database

Set up the database:

cp .env.example .env

And change that DB details to yours, something like DB_HOST, DB_DATABASE, DB_USERNAME, DB_PASSWORD, also go to config/database.php and change default driver:

'default' => env('DB_CONNECTION', 'pgsql'),
to yours, also change the driver's details of DB connection.

Dependencies

Then install all composer & NPM dependencies:

composer install
npm install

Simply compile them (just in case):

npm run dev

DBs

You need the database to work with project, and that's why type:

php artisan migrate

After that to simplify your work, not adding data to DB and wasting time, I prepared the seeders for you, just run:

php artisan db:seed --class=PostsTableSeeder

If after running that you'll see such error like Class not found or something like that, say:

composer dump-autoload

and then run the seeds again:

php artisan db:seed --class=PostsTableSeeder

Usage

Simply just run:

php artisan serve

and test that out.

Demo

Heh, how could I forget about demo. Just click this link

Contribution

You also can contribute. If you noticed a bug, or wanna fix the issue helping me to save time or wanna add something yours, your, useful idea, just let me know that.