cubes-doo / laravel-skeleton-basic
Cubes Laravel project skeleton-basic
Installs: 99
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 2
Open Issues: 0
Type:project
Requires
- php: ^7.1.3
- fideloper/proxy: ^4.0
- friendsofphp/php-cs-fixer: ^2.14
- guzzlehttp/guzzle: ^6.3
- intervention/image: ^2.4
- laravel/framework: 5.8.*
- laravel/tinker: ^1.0
- mateusjunges/laravel-acl: ^1.7
- yajra/laravel-datatables-oracle: ~9.0
Requires (Dev)
- barryvdh/laravel-debugbar: ^3.2
- beyondcode/laravel-dump-server: ^1.0
- filp/whoops: ^2.0
- fzaninotto/faker: ^1.4
- mockery/mockery: ^1.0
- nunomaduro/collision: ^2.0
- phpunit/phpunit: ^7.5
README
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
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
- basics
- for those in the know
- for the brave
Built With
- Composer - PHP package management system
- Laravel 5.8 - The web framework used
- Docker - Containerization platform
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Aleksandar Dimic - Chief Science Officer - aleksandar-dimic
- Aleksa Cvijić - Developer - acvi
See also the list of contributors who participated in this project.