Skip to content

cubes-doo/laravel-skeleton-basic

Repository files navigation

Laravel Skeleton (basic)

A Laravel starter project, for defining standards & kickoff speed 🚀

Read this in other languages: Srpski, Српски

Getting Started

These instructions will get you a copy of the project and help you get it up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  1. Composer
  2. Docker

Installing

A step by step series of examples that will tell you how to get a development env running.

Firstly, we need to pull a project instance from packagist

composer create-project cubes-doo/laravel-skeleton-basic newProjectName

Now, if you want to use docker, first pull docker utillity files from our 'docker-compose' git repository:

git clone https://github.com/cubes-doo/docker-compose.git docker

Next, lets copy the docker/.env.example to a new docker/.env file

cp docker/.env.example docker/.env

Now, something more exciting 😁, lets start our docker container!

sudo docker/docker-start.sh

Since there could be some discrepancies between UID's on different machines, lets run:

cd docker ; ./docker-usermod.sh ; cd ../

just in case. The short explanation for this is: using this command ensures that you have the same privileges as a user in the docker shell, as you would on your own machine.

Now we can run:

sudo docker/docker-console.sh

to enter the docker container's shell, and then inside it, run:

composer install

in file .env in root check if APP_KEY has value (exmple: 'APP_KEY=base64:Q1teAHYgmZtZ5ZFD1CJZp8yzlQuBqUeXsz3Mn++/yl3='), if it doesn't also run:

php artisan key:generate

For making and filling your local database with test data you should run:

php artisan migrate --seed

and you are good to go!

The theme used on this project, developed by Coderthemes, isn't free. So, at least visually, this project won't be useful to you without a paid licence. If you are one of our colleagues here at Cubes, position yourself on the public/ folder:

cd public

and proceed to clone it from its gitlab repository like so:

git clone git@gitlab.cubes.rs:web/laravel-skeleton-theme.git theme

Go ahead, log in and explore! By default, the project is exposed to http://localhost:7737. If this is no good for you, please refer to docker/.env & .env files to change it.

Running code checks

Currently we are only using FriendsOfPHP/PHP-CS-Fixer, as a composer dependency. You'll find the ruleset at .php_cs.

There are also two commands of note to make code checking easy:

sudo docker/docker-php-cs-check.sh

does a dry-run of php-cs-fixer, only telling you what should be changed

and

sudo docker/docker-php-cs-fix.sh

actually fixes the code using php-cs-fixer

Running the tests

We created a script, that runs tests inside the Docker container:

sudo docker/docker-unit-test-run.sh

This script will run all exposed tests in the tests/ folder.

Deployment

Add additional notes about how to deploy this on a live system

Reading Material

Built With

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

About

Basic skeleton for Laravel projects

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages