Friday, March 3, 2017

Using Laravel activity logger Regulus343/ActivityLog

I start Using Laravel activity logger Regulus343/ActivityLog package and and I implemented all the activities but when I made a new user the DB does not log it ,here is my code

    <?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');
    }
}



via Shanaka WickramaArachchi

Advertisement