Skip to content

Instantly share code, notes, and snippets.

@ShanakaWickramaarachchi
Created March 3, 2017 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShanakaWickramaarachchi/0a6ea3869754c3a2bee6fea01f9ebf81 to your computer and use it in GitHub Desktop.
Save ShanakaWickramaarachchi/0a6ea3869754c3a2bee6fea01f9ebf81 to your computer and use it in GitHub Desktop.
Regulus343/ActivityLog implementation
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class PagesController extends Controller
{
//
public function home($user,$id)
{
Activity::log([
'contentId' => $user->id,
'contentType' => 'User',
'action' => 'Create',
'description' => 'Created a User',
'details' => 'Username: '.$user->username,
'updated' => (bool) $id,
]);
return view('welcome');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment