Skip to content

Instantly share code, notes, and snippets.

View ahmadshuami's full-sized avatar

Ahmad Shuami ahmadshuami

View GitHub Profile
<link href="{{ asset('assets/css/xxxx.css') }}" rel="stylesheet">
<script src="{{ asset('assets/js/xxxx.js') }}"></script>
// Bootstrap Icons
@import 'bootstrap-icons/font/bootstrap-icons.css';
<img src="{{ asset('assets/images/xxxx.png') }}">
@include('layouts.admin_layouts.navbar')
@include('layouts.admin_layouts.sidebar')
## Composer
- Download the installer and install (https://getcomposer.org/download/)
## Node.js
= Download the installer and install (choose LTS version, https://nodejs.org)
## Laravel Installer as a global Composer dependency:
- Open cmd prompt
= Enter composer global require laravel/installer
= Enter laravel --version to check laravel installer version
## Apache for Windows
- Download and install Apache
- Download at https://www.apachelounge.com
= Download and install vc_redist_x64
= Download httpd-2.4.55-win64-VS17.zip
- Unzip httpd-2.4.55-win64-VS17.zip
- Copy Apache24 folder to C drive
- Open cmd prompt as Administrator
- Go to the C:\Apache24\bin directory
= Enter httpd.exe -k install
@ahmadshuami
ahmadshuami / Angular CLI
Last active February 1, 2023 12:24
How to: Angular
- Install nodejs
- on Windows, download the installer and install (choose LTS version, https://nodejs.org)
- on macOS, you can install using brew
- OR you can download the installer for mac and install (choose LTS version, https://nodejs.org)
- Install Angular CLI
$ npm install -g @angular/cli
$ ng v
- Create, build, and serve a new angular project
@ahmadshuami
ahmadshuami / Laravel relationship
Last active February 2, 2023 08:15
Laravel Relationship
## hasOne (user has one address), (address own by one user) ##
--------------------------------------------------------------
- User Model
protected $fillable = [
'id',
'name'
];
- Address Model
protected $fillable = [
@ahmadshuami
ahmadshuami / Laravel Application (<laravel 9.19)
Last active February 2, 2023 08:12
How to create a simple laravel application (using bootstrap 5)
- Install Apache / Nginx
- Install PHP
- Install Composer
- on Windows, download the installer and install (https://getcomposer.org/download/)
- on macOS, you can install using brew
- on macOS, make sure to place Composer's system-wide vendor bin directory in your $PATH
$ echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.zshrc
@ahmadshuami
ahmadshuami / Create Apache Virtual Host in macOS
Last active January 7, 2022 14:43
How to Setup Apache, PHP 8.0, MariaDB and Apache Virtual Host using Homebrew Part 4 - Apache Virtual Host
Watch the video at https://youtu.be/_CBqrrh85YY
1. Open apache config file
% subl /usr/local/etc/httpd/httpd.conf
2. Uncomment the following line
LoadModule vhost_alias_module lib/httpd/modules/mod_vhost_alias.so
Include /usr/local/etc/httpd/extra/httpd-vhosts.conf
3. Open vhosts file
@ahmadshuami
ahmadshuami / Install MariaDB using Homebrew
Last active June 22, 2022 18:00
How to Setup Apache, PHP 8.0, MariaDB and Apache Virtual Host using Homebrew Part 3 - Installation of MariaDB
Watch the video at https://youtu.be/uwvh3ojSin4
1. Install MariaDB
% brew install mariadb
2. Start the MariaDB server
% brew services start mariadb
3. Change password
% sudo /usr/local/bin/mysql_secure_installation OR % sudo mysql_secure_installation
@ahmadshuami
ahmadshuami / Install PHP 8.0 using Homebrew
Created January 7, 2022 14:20
How to Setup Apache, PHP 8.0, MariaDB and Apache Virtual Host using Homebrew Part 2 - Installation of PHP 8.0
Watch the video at https://youtu.be/3ESdXYOloeQ
1. Add new tap for php
% brew tap shivammathur/php
2. Install php
% brew install shivammathur/php/php@8.0
3. Link the php
% brew link --overwrite --force php@8.0
@ahmadshuami
ahmadshuami / Install Apache using Homebrew
Last active April 12, 2024 06:52
How to Setup Apache, PHP 8.0, MariaDB and Apache Virtual Host using Homebrew Part 1 - Installation of Apache
Watch the video at https://youtu.be/Tlu2Prm_UNw
1. Stop default apache
% sudo apachectl stop
% sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
2. Install apache
% brew install httpd
% brew services start httpd