Skip to content

Instantly share code, notes, and snippets.

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

CryDeTaan

🏠
Working from home
View GitHub Profile
@CryDeTaan
CryDeTaan / Laravel_Sanctum_API.postman_collection.json
Last active August 12, 2020 06:03
Laravel Sanctum API Postman Collection
{
"info": {
"_postman_id": "5f8e6b13-11e0-402e-8aab-2fef95c7fb42",
"name": "Laravel Sanctum API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Register",
"protocolProfileBehavior": {
div class="form-group row">
<label for="inputEmail3" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputEmail3" placeholder="Email" v-model="form.email" required>
<span class="invalid-feedback d-block" role="alert" v-if="form.errors.has('email')" v-text="form.errors.get('email')"></span>
</div>
</div>
/**
* Submit the form.
*
* @param {string} requestType
* @param {string} url
*/
submit(requestType, url) {
return new Promise((resolve, reject) => {
axios[requestType](url, this.data())
.then(response => {
@CryDeTaan
CryDeTaan / onSubmit.js
Created October 8, 2019 06:29
Gist for medium post
methods: {
onSubmit(){
this.form.password_confirmation = this.form.password; // Temp for this form only.
this.form
.post('/users')
.then(user => this.users.push(user));
}
@CryDeTaan
CryDeTaan / content.blade.php
Created October 8, 2019 05:49
Gist for medium post
<div class="content-wrapper">
<router-view></router-view>
</div>
@CryDeTaan
CryDeTaan / something-new.vue
Last active October 8, 2019 06:28
Gist for medium post
<template>
<div>
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0 text-dark">Something New</h1>
</div><!-- /.col -->
@CryDeTaan
CryDeTaan / routes.js
Created October 8, 2019 05:42
Gist for medium
let routes = [
{
path: '/dashboard',
component: require('./views/dashboard').default
},
{
path: '/users',
component: require('./views/users').default
},
{
@CryDeTaan
CryDeTaan / sidebar.blade.php
Last active October 8, 2019 06:11
Gist for medium post
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
<li class="nav-item">
<router-link tag="a" to="/dashboard" class="nav-link">
<i class="nav-icon fas fa-tachometer-alt"></i>
@CryDeTaan
CryDeTaan / webpack.mix.js
Created October 7, 2019 17:58
Gist for medium post
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css') // Remove the ';'
.copy('resources/assets/images', 'public/images'); // This should be added.
@CryDeTaan
CryDeTaan / web.php
Created October 7, 2019 17:53
Gist for Medium post
<?php
/* ... SNIP ... */
Route::get('/admin/', function () {
if (Auth::check()) {
return view('admin');
}
return redirect('/login');