ghazalitajuddin

  • Adding div below primary navigation add_action( ‘genesis_before_content_sidebar_wrap’, ‘feature_my_single_post_image’ ); function feature_my_single_post_image() { if( is_singular( ‘page’ ) ) { global $post; $size = ‘full-size’; $default_attr = array( ‘class’ => “aligncenter attachment-$size $size”, ‘alt’ => $post->post_title, ‘title’ => $post->post_title, ); printf( ‘<div class=”example”>%s</div>’, genesis_get_image( array( ‘size’ => $size, ‘attr’ => $default_attr ) ) ); } } add_image_size(‘panoramic’,…

    Baca catatan

  • There is a lot special functions that helps simplified our code like this Looking for more? Visit here or https://laravel.com/docs/5.3/eloquent-collections.

    Baca catatan

  • Sentinel::RegisterAndActivate() //Register the $request user and activate if(Sentinel::registerAndActivate($request->All())){ //Search the new registered user $user = User::whereEmail($request->get(’email’))->firstOrFail(); //Bind the user to Activation Table $activation=Activation::create($userSentinel); //Assign A Profile To The New Registered User $userProfile = new Profile(); $userProfile->user_id = $user->id; $userProfile->smoked = $request->smoked; $userProfile->lat = 0.0; $userProfile->lng = 0.0; $user->profile()->save($userProfile); //Find role $role=Sentinel::findRoleBySlug(‘member’)->firstOrFail(); //Attach the user to…

    Baca catatan

  • Middleware is a class that have special function in Laravel. Middleware placed in between the User and  Apps.  Before you can access the Apps, Middleware will do his job first. We can use Middleware to do several thing Do you authenticated? What is your role? Do you authorized? Can you perform this action? etc class MemberMiddleware…

    Baca catatan