Yadda ake amfani da aikin taimakon al'ada a cikin laravel?

A cikin wannan koyawa, za mu nuna muku yadda ake amfani da aikin taimakon alada a Laravel. Ayyukan taimako aiki ne na alada wanda kuka ƙirƙira don ...

A cikin wannan koyawa, za mu nuna muku yadda ake amfani da aikin taimakon al'ada a Laravel. Ayyukan taimako aiki ne na al'ada wanda kuka ƙirƙira don sauƙaƙe rayuwar ku. Kuna iya amfani da aikin taimako don aiwatar da ayyuka gama gari a cikin aikace-aikacenku, ko don sauƙaƙe takamaiman ayyuka don aiwatarwa

Lokacin da ka ƙirƙiri aikin taimako, kuna ba shi suna da sa hannun aiki. Sa hannun aikin saitin buƙatun da dole ne aikin ku ya cika. Sunan na zaɓi ne, amma yana da taimako lokacin da kake son tuna abin da aikin ke yi

Don amfani da aikin taimako a cikin aikace-aikacenku, da farko kuna buƙatar haɗa aikin taimako a cikin sunan aikace-aikacenku. Don yin wannan, zaku iya amfani da aikin haɗawa. Ayyukan haɗawa yana ɗaukar gardama biyu. sunan fayil ɗin da kake son haɗawa, da hanyar zuwa fayil ɗin

Na gaba, kuna buƙatar haɗa aikin a cikin lambar aikace-aikacen ku. Don yin wannan, zaka iya amfani da aikin amfani. Aikin amfani yana ɗaukar gardama biyu. sunan aikin, da kuma hanyar zuwa aikin

A ƙarshe, kuna buƙatar kiran aikin. Don yin wannan, zaku iya amfani da aikin kira. Aikin kira yana ɗaukar gardama biyu. sunan aikin, da muhawarar da aikin ke tsammani

A cikin wannan koyawa, za mu nuna muku yadda ake amfani da aikin taimakon al'ada don ƙirƙirar sabon asusun mai amfani a cikin aikace-aikacenku na Laravel. Ayyukan taimakon asusun mai amfani zai ɗauki sunan mai amfani da shigar da kalmar wucewa, kuma zai ƙirƙiri sabon asusun mai amfani ga mai amfani a cikin bayanan.

Don amfani da aikin taimakon asusun mai amfani, da farko haɗa aikin taimakon asusun mai amfani a cikin sunan aikace-aikacen ku. Don yin wannan, zaku iya amfani da aikin haɗawa. Ayyukan haɗawa yana ɗaukar gardama biyu. sunan fayil ɗin da kake son haɗawa, da hanyar zuwa fayil ɗin

Na gaba, kuna buƙatar haɗa aikin taimakon asusun mai amfani a cikin lambar aikace-aikacen ku. Don yin wannan, zaka iya amfani da aikin amfani. Aikin amfani yana ɗaukar gardama biyu. sunan aikin, da kuma hanyar zuwa aikin

A ƙarshe, kuna buƙatar kiran aikin taimakon asusun mai amfani. Don yin wannan, zaku iya amfani da aikin kira. Aikin kira yana ɗaukar gardama biyu. sunan aikin, da muhawarar da aikin ke tsammani

A cikin wannan koyawa, za mu nuna muku yadda ake amfani da aikin taimakon al'ada don ƙirƙirar sabon asusun mai amfani a cikin aikace-aikacenku na Laravel. Ayyukan mataimakan asusun mai amfani zai ɗauki sunan mai amfani da shigar da kalmar wucewa

Wannan fakitin yana ƙirƙirar fayilolin mataimaka waɗanda ke ba da damar IDE ɗinku don samar da daidaitaccen aiki na atomatik. Saboda tsararraki yana dogara ne akan fayilolin da ke cikin aikin ku, koyaushe yana kan zamani

Ya dace da Laravel 8 da PHP 7. 3+

Shigarwa

Yi amfani da umarni mai zuwa don buƙatar wannan fakitin tare da mawaki

____0

Wannan fakitin yana amfani da injin ganowa ta atomatik na Laravels, wanda ke nufin ba za a ɗora shi ba idan ba a shigar da abubuwan dogaro a samarwa ba.

Idan kana buƙatar sarrafa wannan da hannu don kowane dalili,

  • A cikin
    public function register()
    {
        if ($this->app->isLocal()) {
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
        }
        // ...
    }
    2, ƙara fakitin zuwa maɓallin
    public function register()
    {
        if ($this->app->isLocal()) {
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
        }
        // ...
    }
    1, e. g

    ____3

  • A cikin ____14, ƙara aji mai zuwa zuwa tsararrun __
    public function register()
    {
        if ($this->app->isLocal()) {
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
        }
        // ...
    }
    3

    ____6

    Idan kawai kuna son loda shi da hannu a cikin wuraren da ba samarwa ba, zaku iya amfani da hanyar
    public function register()
    {
        if ($this->app->isLocal()) {
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
        }
        // ...
    }
    6 don ƙara shi zuwa ga
    public function register()
    {
        if ($this->app->isLocal()) {
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
        }
        // ...
    }
    5 naku.

    ____1

Lura. Ya kamata a kauce wa caching da daidaitawa a cikin yanayin ci gaban ku saboda yana iya haifar da matsaloli bayan shigar da wannan kunshin;

Amfani

Duba wannan bidiyon Laracasts don bayyani/bayani

  • ____18 -
  • ____19 -
  • public function register()
    {
        if ($this->app->isLocal()) {
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
        }
        // ...
    }
    30 -

Lura. Babban Rubutun yana buƙatar CodeComplice. https. //github. com/spectacles/CodeComplice

Ƙarfin PHPDoc don Laravel Facades an sarrafa shi ta atomatik

Yanzu zaku iya samar da takaddun da kanku (don sabuntawa nan gaba)

____13

Lura. Domin

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
31 dole ne a fara sharewa, gudanar da
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
32 kafin samarwa

Wannan zai ƙirƙiri fayil ɗin

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
33, wanda IDE ɗin ku ake sa ran za a sake nazarinsa don cikawa ta atomatik. Kuna iya canza sunanta ta amfani da saitin
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
34

Kuna iya saita __

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
2 don yin wannan duk lokacin da aka sabunta abubuwan dogaronku

____10

Hakanan zaka iya buga fayil ɗin sanyi don canza aiwatarwa (e. g. dubawa zuwa takamaiman aji) ko saita _

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
36 rashin daidaituwa

____12

Janareta yayi ƙoƙarin gano ajin gaskiya, amma idan ba'a samo shi ba, zaku iya ayyana shi a cikin fayil ɗin daidaitawa

Wasu azuzuwan suna buƙatar haɗin bayanai mai aiki. Wasu facade za a keɓe idan ba ku da tsohuwar haɗin aiki. Ta haɗa da zaɓi na

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
37, zaku iya amfani da direban SQLite na ƙwaƙwalwar ajiya

Kuna da zaɓi na haɗa fayilolin mataimaka. Ba a kunna wannan ta tsohuwa ba, amma ana iya kashe shi ta amfani da zaɓi na

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
38. An riga an saita ____139, amma kuna iya ƙara / cire fayiloli daga fayil ɗin daidaitawa.

Ƙirƙirar PHPDoc don macros da mixins an sarrafa su ta atomatik

Wannan fakitin na iya samar da PHPDocs don macros da mixins kuma ƙara su zuwa fayil ɗin

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
33

Koyaya, wannan yana aiki ne kawai idan an yi amfani da nau'in nuni lokacin bayyana macro

____17

PHPDocs na atomatik don samfura

Kuna iya amfani da umarnin

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
9 don samar da PHPDocs dangane da ginshiƙan tebur, alaƙa, da masu haɓakawa / saiti idan ba kwa son rubuta abubuwan mallakar ku

Lura. Don duba teburin kowane samfuri, wannan umarni yana buƙatar haɗin bayanai mai aiki

An sa ka sake rubutawa ko rubuta zuwa wani fayil daban ta tsohuwa (

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
02). Kuna iya ko dai rubuta sharhi kai tsaye zuwa fayil ɗin Model ɗinku tare da zaɓi na __
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
03, ko tilasta musu kada a rubuta su da zaɓin ____104.

A madadin, yin amfani da __

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
05 zai ƙara alamar haɗin kai kawai zuwa fayil ɗin Model ɗin ku, tare da sauran rubuta a cikin (
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
02). Sunan ajin zai bambanta da sunan samfurin, tare da guje wa ɓacin rai na kwafin IDE

Da fatan za a yi ajiyar samfuran ku kafin shigar da bayanin

Lokacin gyara samfuran, kiyaye maganganun da ke akwai kuma ƙara sabbin kaddarori/hanyoyi kawai. Idan ba za a iya samun PHPDoc na yanzu ba, an maye gurbinsa ko ƙara shi. Ana watsi da PHPDocs na yanzu lokacin amfani da zaɓi na

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
07, kuma sabbin ginshiƙai/dangantaka kawai ana adana su azaman PHPDocs.

____35

____36

Tare da zaɓin ____105

____30

Kundin Tsarin Samfura

Samfuran da ke cikin ____109 ana duba su ta tsohuwa. Hujjar zaɓin ta ƙayyadad da samfuran da za a yi amfani da su (kuma a wajen ƙa'idar/samfurin)

____31

Hakanan zaka iya bincika wani kundin adireshi ta hanyar tantance

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
20 (dangane da hanyar tushe)

____32

Kuna iya sanya fayil ɗin sanyi (

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
21) jama'a kuma saita tsoffin kundayen adireshi

Yi watsi da Samfura

Ana iya yin watsi da samfura ta zaɓi ____122

____33

A madadin, ana iya yin watsi da tsarin ____123

____34

Sihiri ____124 hanyoyin

Mai magana yana ba ku damar kiran

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
25 akan samfuran ku, e. g. g. ____126 kuma yana canza shi zuwa e ta atomatik. g.
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
27

Idan ba kwa son ƙirƙirar su (ɗaya ga kowane shafi), zaku iya kashe shi ta hanyar gyara saitin

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
28 da canza shi zuwa
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
29

Sihiri ____170 kadarorin

Kuna iya amfani da hanyar don ƙidaya adadin sakamakon dangantaka ba tare da ainihin loda su ba. Ana sanya waɗannan sakamakon zuwa halaye daidai da al'adar

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
72

Ana haifar da waɗannan halayen ta tsohuwa a cikin phpdoc. Kuna iya kashe su ta hanyar canza tsarin

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
73 zuwa ____129

Taimakawa
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
75 bisa DocBlock

Dangantaka da getters/seta kuma na iya ƙara sharhi zuwa kadara kamar ginshiƙan tebur don mafi kyawun tallafin IDEs. Sakamakon haka, ana amfani da docblock na al'ada

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
75

____35

Ƙaddamar da Ƙwararren Ƙwararren Ƙwararren Ƙirƙiri

Ƙwayoyin ƙira yanzu suna da sabuwar hanyar da ake kira

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
77 Reference, wanda ke ba mu damar ƙara tallafi don ƙirƙirar sabon aji mai sadaukarwa maimakon yin amfani da iyakokin gida a cikin ƙirar kanta.

Idan ba kwa son ƙirƙirar su (ɗaya ga kowane shafi), zaku iya kashe su ta hanyar gyara saitin

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
78 da canza ƙimar zuwa __
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
29

Marasa tallafi ko nau'ikan bayanai na al'ada

Nau'in ginshiƙan gama gari (e. g. Nau'o'in PHP (varchar, lamba) an tsara su daidai (______350,

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
51)

Koyaya, kuna iya amfani da nau'ikan ginshiƙan al'ada a cikin bayananku kamar __

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
52, ____353, ____354, ____355, da sauransu. wanda zai iya haifar da "Nau'in bayanan da ba a sani ba" -Exception

Kuna iya taswirar waɗancan lokuta na musamman ta amfani da daidaitawa

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
56. Misali

____36

Nau'in Dangantakar Al'ada

Idan kana amfani da alaƙar da ba a gina su cikin Laravel ba, dole ne ka saka sunan da ajin dawowa a cikin tsarin don tabbatar da tsararrun tsararru.

____37

Abubuwan da aka samo yawanci za su haifar da ƙimar dawowa bisa sunan dangantakar

Idan alakar ku ta al'ada ba ta kiyaye wannan yarjejeniyar suna ba, zaku iya ayyana nau'in dawowar su da hannu. Akwai zaɓuɓɓuka biyu. ____357 da ____358

____38

Model Kugiya

Idan kuna buƙatar ƙarin bayani akan ƙirar ku daga tushe waɗanda ba a sarrafa su ta hanyar tsoho ba, zaku iya amfani da ƙugiya don ƙara ƙarin bayani akan tashi. Kawai ƙirƙirar aji wanda ke aiwatar da

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
59 kuma ƙara shi zuwa tsararrun saitin ____360

____39

Ana kiran hanyar ____361 yayin ƙirar ƙira kuma tana karɓar

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
62 da ____363 da ke gudana yanzu, e. g

____60

____61

Hanyoyin Laravel Fluent' PHPDocs ana haifar da su ta atomatik

Idan, alal misali, kuna buƙatar tallafin PHPDocs don hanyoyin Fluent a ƙaura,

____62

Kawai canza layin

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
64 a cikin fayil ɗinku ____365 zuwa bayan buga mai siyarwa

____63

Sannan gudu ____18;

Kammalawa atomatik don magina masana'anta

Idan kuna son hanyoyin ____367 da ____368 don dawo da daidaitaccen ajin ƙira, ba da damar maginin masana'anta na al'ada a cikin fayil ɗinku ____365 tare da layin ____369. Deprecated a Laravel 8 kuma daga baya

____64

Dole ne ku buga fayil ɗin PhpStorm Meta (duba ƙasa) don wannan ya yi aiki

PhpStorm Meta don misalan kwantena

Yana yiwuwa a ƙirƙiri fayil ɗin meta na PhpStorm wanda ya haɗa da goyan bayan ƙirar ƙirar masana'anta. Ga Laravel, wannan yana nufin za mu iya koyar da PhpStorm akan nau'in abin da muke warwarewa daga kwantena na IoC. Misali,

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
01 zai dawo da wani abu
"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
02, don haka zaka iya kiran ____303 tare da fayil na meta kuma zai cika hanyoyin Dispatcher kai tsaye.

____65

____66

Lura. Kuna iya buƙatar sake kunna PhpStorm don tabbatar da cewa

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
04 an yi maƙasudi

Lura. Lokacin da kuka karɓi FatalException. Bincika tsarin ku (misali, cire S3 azaman direban gajimare idan ba ku da saitin S3). Cire Mai Ba da Sabis na Redis lokacin da ba ku amfani da shi. )

Za a iya canza sunan fayil ɗin da aka ƙirƙira ta amfani da saitin

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
05. Wannan yana da amfani idan kuna son cin gajiyar tallafin PhpStorm don kundin adireshin
"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
06. Idan kana son samar da ƙarin fayiloli zuwa PhpStorm, duk fayilolin da aka sanya a wurin ana yin su

Yi amfani da Lumen

Wannan kunshin an yi niyya da farko don haɓaka Laravel, amma kuma ana iya amfani da shi a cikin Lumen tare da wasu gyare-gyare. Saboda Lumen yana aiki da bambanci fiye da Laravel kuma manyan sigogin daidaitawa a maimakon haka suna cikin

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
07, ana buƙatar wasu gyare-gyare.

Kunna Facades

Yayin da Mataimakin Laravel IDE na iya samar da tsoffin Facades don nuna alamar lamba, Lumen baya zuwa tare da kunna Facades. Idan kuna da niyyar amfani da su, dole ne ku kunna su ta hanyar warware wannan layin a cikin sashin

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
08.

____67

Ya kamata ku sami damar amfani da aikin

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
09 don ƙara ƙarin Facades zuwa aikace-aikacenku

Ƙara Mai Ba da Sabis

Shigar da Laravel IDE Helper a cikin

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
10 da rashin daidaituwar layin da ke yin rajistar Masu Ba da Sabis na App zai ba shi damar yin lodi da kyau.

____68

Idan ba ku amfani da wannan layin, wanda yawanci yana da amfani don sarrafa yawancin shigarwar Laravel/Lumen da alheri, kuna buƙatar ƙara wannan layin lambar a ƙarƙashin sashin ____311 na fayil ɗinku __

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
07.

____69

Bayan haka, Laravel IDE Helper yakamata yayi aiki yadda yakamata. Yayin aiwatar da tsara tsarawa, rubutun na iya jefa keɓancewa da ke nuna cewa wasu Class(es) ba su wanzu ko wasu filaye ba a bayyana su ba. Wannan al'ada ce saboda Lumen yana da wasu tsoffin fakiti da aka cire, kamar Kukis, Adana, da Zama. Idan kuna son ƙara waɗannan fakitin, dole ne kuyi haka da hannu kuma ƙila kuna buƙatar ƙirƙirar ƙarin Facades

Ƙara ƙarin Facades

Lumen IDE Helper a halin yanzu baya ɗaukar ƙarin Facades da aka ƙirƙira ƙarƙashin __

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
07 ta amfani da
"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
09 a cikin lissafi, don haka dole ne ku ƙirƙiri fayil ɗin __
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
4 kuma ku ƙara laƙabi na al'ada a ƙarƙashin tsararrun __
"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}
16, kamar yadda aka nuna a ƙasa.

____10

Ana ba da shawarar (amma ba a buƙata) don sake suna

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
4 zuwa wani abu dabam bayan gudanar da
public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}
8, har sai kuna buƙatar sake haifar da takaddun ko bayan wucewa zuwa yanayin samarwa. Lumen5. Idan wannan fayil ɗin yana nan, 1 zai karanta shi don sigogin daidaitawa kuma yana iya mamaye wasu saitunan idan an cika shi gaba ɗaya.

Ta yaya zan yi amfani da aikin taimakon Laravel?

Bi ni ta danna bayanan martaba na don samun ƙarin sabuntawa. .
Mataki na 1. ƙirƙirar fayil ɗin taimako. Ƙirƙiri fayil da ake kira mataimaka a cikin app/ directory. php
Mataki na 2. Rubuta aikin taimako
Mataki na 3. Saka shi a cikin mawakinmu. json. .
Mataki na 4. Sake sabunta jerin abubuwan app na duk azuzuwan. mawaki juji-autoload

A cikin Laravel Blade, ta yaya kuke kiran aikin mataimaki na al'ada?

Ayyukan Mataimakin Kwastam na Laravel tare da Misalin Duniya na Gaskiya .
Ƙirƙiri aikin Laravel. Ina tsammanin kun riga kun shigar da Laravel ta amfani da mawaki. .
Don ƙirƙirar aikin mataimaki na al'ada, ƙirƙirar Fayil ɗin Taimako. .
Ƙirƙiri mai bayarwa. .
Ƙara mai bayarwa zuwa Sanya. .
Kira Daga Mai Gudanarwa. .
Kira daga View(Blade)

Yaya ake rubuta aikin taimako a Laravel 9?

Yadda ake yin Aikin Taimakon Abokin Ciniki na Laravel 9 .
Mataki na 1. Ƙirƙiri mataimaka. php fayil. A wannan mataki, za mu ƙirƙiri app/mataimakan. .
Mataki na 2. A cikin mawaki, ƙara Hanyar Fayil na Taimako. json File. A cikin mawaki, manna lambar da ke ƙasa
Mataki na 3. Run Umurni. Guda umarnin dump-autoload na mawaki a cikin tashar ku yanzu

John Conner
John Conner
John Conner has written about blogger for more than 5 years and for congnghe123 since 2017

Member discussion

       

Related Posts