国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

What is the difference between using a file in a class and using a file outside a class in Laravel?
ringa_lee
ringa_lee 2017-05-16 16:47:46
0
1
606

Laravel What is the difference between use a file inside a calss and use a file outside a class?

For example, we often see a bunch of use after namespace, these use are outside class,
some use is in class again, what is the difference between the two?

Example: HttpControllersAuthRegisterController.php

<?php

namespace App\Http\Controllers\Auth;


use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Http\Request;
use Illuminate\Auth\Events\Registered;



class RegisterController extends Controller
{
    use RegistersUsers;
    
   //...

}
ringa_lee
ringa_lee

ringa_lee

reply all(1)
小葫蘆

Outside the class is the imported namespace, inside the class is the trait, and after the function is the variable capture.

Documentation:

  • Use namespace: alias/import

  • Trait

  • Anonymous function

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template