1. Go to this page and download the library: Download reyjhon/simple-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
reyjhon / simple-php example snippets
return view('welcome');
return view('your_folder.welcome');
return view('welcome', [], 'normal');
public function index()
public function indexAction()
use App\Helper\Auth\AuthHelper as auth;
use Simple\Request;
public function before()
{
if(!auth::user()) {
Request::redirect('/auth/index');
}
}
public function store(Request $request)
{
$file = $request->file('profile_photo'); // profile_photo is the field name of the input type="file" element
$file->upload('folder_name'); // specify the folder where the file is going to store, if upload success it wil return true otherwise false.
}