composer require yajra/laravel-datatables-oracle:~6.0
Open up config/app.php
and add the following in providers
key:
Yajra\Datatables\DatatablesServiceProvider::class,
// takes a {} object and returns a FormData object | |
var objectToFormData = function(obj, form, namespace) { | |
var fd = form || new FormData(); | |
var formKey; | |
for(var property in obj) { | |
if(obj.hasOwnProperty(property)) { | |
if(namespace) { |
<?php | |
namespace Tests\Api; | |
use App\User; | |
use Tests\TestCase as BaseTestCase; | |
use Illuminate\Contracts\Auth\Authenticatable as UserContract; | |
class TestCase extends BaseTestCase | |
{ |
<?php | |
namespace App; | |
use Carbon\Carbon; | |
use Illuminate\Database\Eloquent\Model; | |
class User extends Model | |
{ | |
/** |
* Update (12.09.2017): I have improved the trait so that it can be used with objects other than Eloquent Models.
Some days ago I came across a task where I needed to implement managable state for an Eloquent model. This is a common task, actually there is a mathematical model called "Finite-state Machine". The concept is that the state machine (SM) "can be in exactly one of the finite number of states at any given time". Also changing from one state to another (called transition) depends on fulfilling the conditions defined by its configuration.
Practically this means you define each state that the SM can be in and the possible transitions. To define a transition you set the states on which the transition can be applied (initial conditions) and the only state in which the SM should be after the transition.
That's the theory, let's get to the work.
//things to do after clone angular project | |
npm install | |
bower install | |
grunt wiredep | |
grunt server | |
//check version of all installed bower packages | |
bower list --json=0 --offline | |
//update angular version using bower |
You could update your index: | |
cd /root/folder/of/your/repo | |
git update-index --assume-unchanged nbproject/project.properties | |
and make sure it never shows as "updated" in your current repo. | |
That means it won't ever been pushed, but it is still present in the index. | |
(and it can be modified at will in your local working tree). |
You can't merge with local modifications. Git protects you from losing potentially important changes. | |
You have three options. | |
1. Commit the change using | |
git commit -m "My message" | |
2. Stash it. | |
Stashing acts as a stack, where you can push changes, and you pop them in reverse order. |
//8 Methods to Iterate through Array | |
//forEach (Do Operation for Each Item in the Array) | |
[1,2,3].forEach(function(item,index) { | |
console.log('item:',item,'index:',index); | |
}); | |
//map (Translate/Map all Elements in an Array to Another Set of Values.) | |
const oneArray = [1,2,3]; | |
const doubledArray = oneArray.map(function(item) { |
<?php namespace App\Traits; | |
use App\MeetingApprovalCommittee; | |
use App\Role; | |
trait CheckRequestPermission { | |
/** | |
* Check role permission to form request class to be validated | |
* |