Skip to content

Instantly share code, notes, and snippets.

View felixwetell's full-sized avatar
🦄
Wow bro, is that a unicorn?!

Felix Wetell felixwetell

🦄
Wow bro, is that a unicorn?!
View GitHub Profile
@felixwetell
felixwetell / Turning Laravel into a progressive web app - Laravel 8.X.md
Last active May 15, 2023 05:52
Turning Laravel into a progressive web app - Laravel 8.X

Turning Laravel into a progressive web app - Laravel 8.x

Using Laravel 8.x and Mix. Simple guide to make your Laravel app to a progressive web app fast.

Prerequisites

This guide requires that you already have a working Laravel application and have some familiarity working in Laravel applications.

Installation guide

@felixwetell
felixwetell / Installation guide.md
Last active August 16, 2022 14:46
macOS - Installation guide for Laravel 8.x

macOS - Installation guide for Laravel 8.x

Using Brew, Composer, PHP 7.4.3 and Laravel 8.x

Installation guide

  1. Install Brew package manager
    • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Install PHP using the command brew install php
    • If PHP is already installed, just run the command brew upgrade php to get the latest version
  3. Install Composer using the command brew install composer
  4. Using the command line, head to the folder where you want your project
  5. Now time to create the project, run the command composer create-project --prefer-dist laravel/laravel example
@felixwetell
felixwetell / Installation guide.md
Last active October 25, 2022 11:22
Windows - Installation guide for Laravel 8.x

Windows - Installation guide for Laravel 8.x

Using Composer, PHP 7.4.1, Laravel 8.x and MAMP 4.2.0.

Installation guide

  1. Download and install MAMP or somehing similair.
  2. Download and install Composer.
    • Choose PHP 7.4.1 from MAMP as command-line PHP, can be found at C:\MAMP\bin\php\php7.4.16.
  3. Using the command line, head to the folder C:\MAMP\htdocs.
  4. Run command composer create-project --prefer-dist laravel/laravel example.
  • If you get issue 1, edit and add extension=php_fileinfo.dll to C:\MAMP\bin\php7.4.1\php.ini and C:\MAMP\conf\php7.4.1\php.ini.
@felixwetell
felixwetell / _flash-message.blade.php
Last active March 15, 2021 19:20
Partial view - Session flash message example for Laravel 8.x with Bootstrap 4
@if( session()->has( 'success' ) )
<div class="alert alert-success alert-dismissible fade show" role="alert">
{{ session()->get( 'success' ) }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
@elseif( session()->has( 'error' ) )
<div class="alert alert-danger alert-dismissible fade show" role="alert">
{{ session()->get( 'error' ) }}