Skip to content

Interactive workshop slides on Laravel for the course Full-stack Development, bach. elo-ict @ Odisee, Belgium. ␥ Subjects: Laravel basics, routing, Blade, Eloquent, Migrations, Web APIs, Authentication, ...

Notifications You must be signed in to change notification settings

mjoris/workshops-fsd-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Full-stack Development - workshop materials on Laravel

Interactive workshop slides for the course Full-stack Development, part of the Professional Bachelor ICT study program @ Odisee, Belgium.

A web-based slideshow containing many PHP/Laravel code examples, which can be interactively executed in the provided Docker multi-container environment.

(CC) Joris Maervoet

Installation instructions

Running the slides without working code examples

  • Install git and run from your terminal/cmd
git clone https://github.com/mjoris/workshops-fsd-laravel.git
  • Open the file workshops-fsd-laravel/app/public/slides/index.html in a browser

Running the slides with working code examples

  • Install git and Docker Desktop.
  • Start the Docker Desktop application
  • Run from your terminal/cmd
git clone https://github.com/mjoris/workshops-fsd-laravel.git
  • When Docker is up and running, run from your terminal/cmd
cd workshops-fsd-laravel
docker-compose up
  • When the containers are up and running, run from a new terminal/cmd
cd workshops-fsd-laravel
docker-compose exec php-web bash

From the Bash terminal in the php-web container, run the following commands:

composer install
cp .env.example .env
chmod -R 777 storage bootstrap/cache
php artisan key:generate
php artisan migrate
php artisan db:seed --class DemoSeeder
  • Browse to http://localhost:8080
  • Stop the environment in your terminal/cmd by pressing Ctrl+C
  • In order to avoid conflicts with your lab environment, run from your terminal/cmd
docker-compose down

Recipes and troubleshooting

Updating the course materials

  • Run from your terminal/cmd, in your workshops-fsd-laravel directory
git reset --hard
git pull origin master

docker-compose up does not start one or more containers

  • Look at the output of docker-compose up. When a container (fails and) exits, it is shown as the last line of the container output (colored tags by container)
  • Alternatively, start another terminal/cmd and inspect the output of docker-compose ps -a. You can see which container exited, exactly when.
  • Probably one of the containers fails because TCP/IP port 8000, 8080 or 3307 is already in use on your system. Stop the environment, change the port in docker-compose.yml en rerun docker-compose up.

Restoring the database (tables)

Might be necessary when this repository contains raw database updates.

  • Before running docker-compose up, delete all files in the mysql-data directory

Nevertheless, Laravel-related database updates will be provided in the form of Migrations, which can be administered by running php artisan migrate from the php-web container

About

Interactive workshop slides on Laravel for the course Full-stack Development, bach. elo-ict @ Odisee, Belgium. ␥ Subjects: Laravel basics, routing, Blade, Eloquent, Migrations, Web APIs, Authentication, ...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published