PHP code example of aratta-studios / aratta-laravel-boilerplate

1. Go to this page and download the library: Download aratta-studios/aratta-laravel-boilerplate 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/ */

    

aratta-studios / aratta-laravel-boilerplate example snippets


use App\Http\Helpers\InputHelper;

InputHelper::inputChecker(
    $request,
    [
        $request->field_one,
        $request->field_two,
        // All fields that you need to check
    ],
    function (Request $request) {
        // Input is correct do something
    }
);

InputHelper::inputChecker(
    $request,
    null,
    function (Request $request) {
        // Do something
    }
);

use App\Http\Helpers\ResponseHelper;

ResponseHelper::jsonResponse(null, Response::HTTP_OK, config('messages.success'))->send();

use App\Http\Helpers\CedarMapHelper;

$directionsData = CedarMapHelper::getDirectionsData(
    (object) ['latitude' => $request->get('start_lat'), 'longitude' => $request->get('start_lng')],
    (object) ['latitude' => $request->get('end_lat'), 'longitude' => $request->get('end_lng')]
);

use App\Http\Helpers\FirebaseHelper;

FirebaseHelper::sendFcmNotificationMessage($pushTokenArray, $data, 'Text');

use App\Http\Helpers\SmsPanelHelper;

SmsPanelHelper::sendSms($phoneNumber), $tempCode);

php ControllerGenerator.php --name=ControllerName

php VuePageGenerator.php --name=pageName

php VuePageGenerator.php --name=componentName

php artisan serve