Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel observer

<?php

namespace AppObservers;

use AppModelsUser;

class UserObserver
{
    /**
     * Handle the User "created" event.
     *
     * @param  AppModelsUser  $user
     * @return void
     */
    public function created(User $user)
    {
        //
    }

    /**
     * Handle the User "updated" event.
     *
     * @param  AppModelsUser  $user
     * @return void
     */
    public function updated(User $user)
    {
        //
    }

    /**
     * Handle the User "deleted" event.
     *
     * @param  AppModelsUser  $user
     * @return void
     */
    public function deleted(User $user)
    {
        //
    }

    /**
     * Handle the User "forceDeleted" event.
     *
     * @param  AppModelsUser  $user
     * @return void
     */
    public function forceDeleted(User $user)
    {
        //
    }
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #observer
ADD COMMENT
Topic
Name
9+8 =