Skip to content

Instantly share code, notes, and snippets.

View rizkhal's full-sized avatar
🌴
On vacation

Rizkal rizkhal

🌴
On vacation
View GitHub Profile
@rizkhal
rizkhal / helper.php
Last active February 22, 2020 07:54
<?php
if (! function_exists('notice')) {
function notice($type, $content) {
$notices = session()->get('notice');
if(! is_array( $notices ))
$notices = [];
array_push($notices, [
'type' => $type,
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<title>Larave repository desing pattern</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}" />
<!-- Styles -->
<link rel="stylesheet" href="{{ asset('assets/css/bootstrap.min.css') }}">
@extends('layouts.master')
@push('heading')
@component('components.heading')
New Post
@endcomponent
@endpush
@push('button')
@component('components.button')
<a href="{{$url}}" class="btn btn-sm btn-info mb-2">{{$text}}</a>
<h1 class="text-center font-weight-bold text-primary mt-4">
{{ $slot }}
</h1>
@extends('layouts.master')
@push('heading')
@component('components.heading')
Edit Post
@endcomponent
@endpush
@push('button')
@component('components.button')
@extends('layouts.master')
@push('heading')
@component('components.heading')
All Posts
@endcomponent
@endpush
@push('button')
@component('components.button')
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
<?php
echo "Input number: \n";
while ($input = trim(fgets(STDIN))) {
$args[] = $input;
if ($input == "=") {
print(array_sum($args));
break;
}
}
@rizkhal
rizkhal / GitCommitEmoji.md
Created July 21, 2020 20:07 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji