Skip to content

Instantly share code, notes, and snippets.

View onurkacmaz's full-sized avatar

Onur Kaçmaz onurkacmaz

View GitHub Profile
<?php
namespace App\Models\Concerns;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Auth;
<?php
namespace App\Models\Concerns;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Uri;
trait HasPhoto
@virbo
virbo / lempp.md
Last active April 24, 2026 08:10
Install Linux Centos 7, Nginx, MySQL, Postgres, PHP 8.0

Update LANG

Edit environtment vi /etc/environment add these lines...

LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@moaj257
moaj257 / Lumen-Laravel-Htaccess.md
Last active January 21, 2023 17:41
Laravel/Lumen Shared Hosting htaccess

Copy htaccess code to your laravel/lumen .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*) public/$1 [L]
</IfModule>
@Pen-y-Fan
Pen-y-Fan / Test Driven Development (TDD) Learning Plan.md
Last active January 12, 2026 09:07
Test Driven Development (TDD)

Learning Plan for Test Driven Development (TDD)

These learning resources primarily focus on Test Driven Development (TDD).

  • There is an emphasis on learning using PHP, Laravel and PHPUnit.
  • All these resources are free (at the time of writing)
@breekoy
breekoy / centos7-nginx-laravel-configuration
Last active November 20, 2024 00:48
Configuration steps on CentOS7 server to run Laravel applications + Redis and Node.JS on nginx
==== CENTOS 7 LEMP STACK INSTALLATION ====
0. Make sure the centos 7 server have internet connection
1. Install the EPEL Repository
sudo yum -y install epel-release
2. Install the Remi Repository
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
3. Install Nginx