Skip to content

Instantly share code, notes, and snippets.

{
"id": "CfdF2XtXC68iJ6Hr",
"meta": {
"instanceId": "31e69f7f4a77bf465b805824e303232f0227212ae922d12133a0f96ffeab4fef",
"templateCredsSetupCompleted": true
},
"name": "✨🤖Automated AI Powered Social Media Content Factory for X + Facebook + Instagram + LinkedIn",
"tags": [],
"nodes": [
{
<?php
namespace App\Core\Concerns;
trait AuthorizesVue
{
/**
* Accessor for can attribute.
*/
public function getCanAttribute()
blatantly.Icky.Choral8.9poole.Adjust.1colonize
+--------+-----------+------------------------------------------------------------------+----------------------------------------+---------------------------------------------------------------------+-----------------------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+-----------+------------------------------------------------------------------+----------------------------------------+---------------------------------------------------------------------+-----------------------------+
| | GET|HEAD | / | pages.dashboard | App\Http\Controllers\PagesController@dashboard | web,auth |
| | GET|HEAD | _dusk/login/{userId}/{guard?} |
+--------+-----------+------------------------------------------------------------------+----------------------------------------+---------------------------------------------------------------------+-----------------------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+-----------+------------------------------------------------------------------+----------------------------------------+---------------------------------------------------------------------+-----------------------------+
| | GET|HEAD | / | pages.dashboard | App\Http\Controllers\PagesController@dashboard | web,auth |
| | GET|HEAD | _dusk/login/{userId}/{guard?} |
// I just do a replace to transform something like users.events.inddex in UsersEventsIndex
ViewFactory::macro('component', function ($name, $data = []) {
$name = str_replace(' ', '', ucwords(str_replace('.', ' ', $name)));
return View::make('app', ['name' => $name, 'data' => $data]);
});
// In the app.js tiny little modifications to calculate the componentName
@jobcerto
jobcerto / restore-items-from-parent-or-child.php
Last active August 17, 2018 05:44
Restore records from child or parent
// FILTRA O USUÁRIO
$userToDelete = User::first();
//REMOVE OS PRODUTOS
$userToDelete->products()->delete();
//REMOVE O USUÁRIO
$userToDelete->delete();
//FILTRA O USUARIO DA LIXEIRA
$userToRestore = User::withTrashed()->first();
<?php
namespace App\System\Models;
use App\Shared\Models\User as Shared;
use Hyn\Tenancy\Traits\UsesSystemConnection;
class User extends Shared
{
use UsesSystemConnection;