First step is to overwrite the default methods in your User Model.
NB: We are still using the default Laravel Notifications.
# App/Models/User.php
php| // for multiple requests | |
| let isRefreshing = false; | |
| let failedQueue = []; | |
| const processQueue = (error, token = null) => { | |
| failedQueue.forEach(prom => { | |
| if (error) { | |
| prom.reject(error); | |
| } else { | |
| prom.resolve(token); |
Source: https://medium.com/@Mahmoud_Zalt/eloquent-relationships-cheat-sheet-5155498c209
| One to one ( 1-1) |
One to many ( 1-n) |
Poly one to many ( 1x-n) |
Many to many ( n-n) |
Poly many to many ( nx-n) |
|
|---|---|---|---|---|---|
| Number of models | 2 only | 2 only | 3 and above | 2 only | 3 and above |
| Number of tables | 2 (1/model) | 2 (1/model) | 3+ (1/model) | 3 (1/model + pivot) | 4+ (1/model + pivot) |
| Pivot table | - | - | - | required |
| FROM php:7.0-fpm | |
| # ... | |
| RUN apt-get update && apt-get install -y \ | |
| libpq-dev \ | |
| libmemcached-dev \ | |
| curl | |
| # ... |
| <?php namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| trait RestControllerTrait | |
| { | |
| public function index() | |
| { | |
| $m = self::MODEL; | |
| return $this->listResponse($m::all()); |
| [alias] | |
| st = status | |
| co = checkout | |
| ci = commit | |
| br = branch | |
| df = diff | |
| lp = log -p | |
| com = checkout master | |
| fe = fetch origin | |
| hr = reset origin/master --hard |
This uses Twitter Bootstrap classes for CodeIgniter pagination.
Drop this file into application/config.
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
| # vi: ft=dosini | |
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = pavan.sss1991@gmail.com | |
| username = pksunkara | |
| [core] | |
| editor = nvim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| pager = delta | |
| [column] |