by Garth | Jan 12, 2023 | Laravel
Edit your htaccess file. This alone will redirect your root o the public folder. If you have a lot inside of your htaccess file. Be careful while adding stuff. Ensure you keep a backup before editing and test the addition of the code inside the htaccess file....
by Garth | Sep 30, 2022 | Laravel
class MyCustomClassName { public function __construct() { } public function whatever_whatever(){ // Code goes here. And can use anything from the construct. The construct will always load first }...
by Garth | Sep 29, 2022 | Laravel
A Controller or Class in MVC are both just classes. So… Technically speaking. It is possible to write all your functionality inside your controllers and completely ditch the classes folder. But! The purpose of breaking out into separate classes is re-usability....
by Garth | Sep 29, 2022 | Laravel
Save Function (Update and Add in 1 function based on ID) <?php namespace App\Http\Controllers; use Illuminate\Support\Facades\DB; use Illuminate\Http\Request; class RandomController extends WhateverWhateverController { public function saveTermsAndConditions(Request...
by Garth | Sep 29, 2022 | Laravel
Required Laravel includes use Illuminate\Support\Facades\DB; use Illuminate\Http\Request; Select Query class MySpecialController extends Controller { public function rawQueryFunctionNameSelect(Request $request){ $rawQuery= DB::select( DB::raw( ‘SELECT * FROM...
by Garth | Jul 18, 2022 | Amazon Web Services - AWS, Debugging, Laravel
How to fix Laravel showing the directory structure on...