This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include "smsGateway.php"; | |
$smsGateway = new SmsGateway('ADRESSE_EMAIL', 'MOT_DE_PASSE'); | |
$deviceID= IDENTIFIANT_DE_L_APPAREIL; | |
$contacts = $smsGateway->getContacts(); | |
$arrayContacts=array(); | |
foreach($contacts["response"]["result"]["data"] as $contact) { | |
$arrayContacts[]=$contact["id"]; | |
} | |
$smsGateway->sendMessageToContact($arrayContacts, $message, $deviceID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo chown -R $(whoami) ~/.npm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Contracts\Auth\Guard; | |
class Authenticate | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function paths() { | |
$paths_list = array(); | |
$simple_path = $this->check_same_path($this->depart, $this->arrivee); | |
if ($simple_path) { | |
$paths_list = $this->simple_paths($simple_path); | |
} | |
if (!$simple_path || !$paths_list) { | |
$paths_list = $this->complex_paths(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php artisan make:middleware CheckAge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class CheckAge | |
{ | |
/** | |
* Handle an incoming request. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @param \Closure $next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class CheckRole | |
{ | |
/** | |
* Handle the incoming request. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @param \Closure $next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::get('admin/profile', "MonController@fonction")->middleware('auth'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::get('admin/profile', "MonController@fonction")->middleware(CheckAge::class); |
OlderNewer