Skip to content

Instantly share code, notes, and snippets.

View simoebenhida's full-sized avatar
🏠
Working from home

Mohamed Benhida simoebenhida

🏠
Working from home
View GitHub Profile
@simoebenhida
simoebenhida / PosTest.php
Last active March 28, 2020 22:15
Live about testing with PHPunit/Laravel
```php
<?php
namespace Tests\Unit;
use App\Post;
use App\User;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
{
MarrakechSafi : [
'Préfecture de Marrakech',
'Chichaoua',
'Al Haouz',
'El Kelaâ des Sraghna',
'Essaouira',
'Rehamna',
'Safi',
'Youssoufia'
public function up()
{
Schema::create('work', function (Blueprint $table) {
$table->increments('id');
$table->string('Nom');
$table->timestamps();
});
Schema::table('people', function (Blueprint $table) {
$table->unsignedInteger('work_id');
Question::create([
'source' => 'chrome',
'category' => 'ad-account',
'type' => 'yes-no',
'section' => 'optimization',
'text' => 'Do pixel errors show up throughout the funnel and in Diagnostics?',
'action' => 'Looks at pixel helper tool through Chrome extension (3rd party) to see if it populates any errors, then upload screenshot of exact errors. Also looks at the pixel dashboard to see if any diagnostics populates and will provide screenshot from there as well.',
'final' => 'First, go through the funnel and check for pixel errors in every step of the funnel. Upload screenshots of exact errors inside the pixel helper tool. Secondly, open Events Manager within the account, go to Diagnostics and provide screenshots of any errors.'
]);
<?php
if(
!empty($_POST)
&& !empty($_POST['firstName'])
&& ! empty($_POST['lastName'])
&& ! empty($_POST['message'])
) {
echo "Your Form has been successfully Sent!";
}
?>
@simoebenhida
simoebenhida / http_status.php
Last active November 3, 2018 22:51
HTTP STATUS RESPONSES
<?php
//HTTP STATUS RESPONSES
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing',
103 => 'Early Hints',
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
<!doctype html>
<html lang="en">
<head>
<title>TailwindCss</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/dist/styles.css">
</head>
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/