Skip to content

Latest commit

 

History

History
123 lines (85 loc) · 2.16 KB

README.md

File metadata and controls

123 lines (85 loc) · 2.16 KB

Laravel, Next.js, Typescript Template

See the Original Frontend Part by @roketid i just modified some staff

Admin

[email protected]
Password=password
Role=Super Admin

Installation

# clone the repo
$ git clone https://github.com/syedajmal1998/laravel-nextjs-template <project-name>

Server Side

Server Features

Server Installation

# go into app's directory
$ cd <project-name>/server

# install app's dependencies
$ composer install

# copy .env.example to .env
$ cp .env.example .env

If you choice to use MySQL

in file ".env" complete this database configuration:

  • DB_CONNECTION=mysql
  • DB_HOST=127.0.0.1
  • DB_PORT=3306
  • DB_DATABASE=laravel
  • DB_USERNAME=root
  • DB_PASSWORD=

If you choice to use SQLite

# create database
$ touch database/database.sqlite

in file ".env" replace this database configuration:

  • DB_CONNECTION=mysql
  • DB_HOST=127.0.0.1
  • DB_PORT=3306
  • DB_DATABASE=laravel
  • DB_USERNAME=root
  • DB_PASSWORD=

To this:

  • DB_CONNECTION=sqlite

Next step

# in your app directory
# generate laravel APP_KEY
$ php artisan key:generate

# run database migration and seed
$ php artisan migrate:fresh --seed

Usage

# start local server
$ php artisan serve

Client Side

Client Installation

# go into app's directory
$ cd <project-name>/client

# copy .env.example to .env
$ cp .env.example .env

# install dependencies
npm install
# or
yarn install

then, you can run the development server:

npm run dev
# or
yarn dev

NOTE: please make sure server is running.

Open http://localhost:3000 with your browser to see the result.