21
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

laravel-adminのviewをvendor外で動かす

Posted at

最近、laravel-adminで管理画面を作成したので、役に立った事を記載。

「\resources\views\」以下に任意の名前でフォルダを作成する。

今回は「laravel-admin」というフォルダ名で作成
resources.PNG

「\vendor\encore\laravel-admin\resources\views\」以下のファイル・フォルダを「\resources\views\laravel-admin」フォルダへコピーする

resources_laravel-admin.PNG

「app/Admin/bootstrap.php」に下記を追記

app/Admin/bootstrap.php
app('view')->prependNamespace('admin',resource_path('views/laravel-admin'));

検証

ログインページのタイトルを変えてみる

\resources\views\laravel-admin\login.blade.php
<div class="login-box">
  <div class="login-logo">
    <a href="{{ admin_base_path('/') }}"><b>ららべるあどみん</b></a>
  </div>

ブラウザで見てみる

ららべるあどみん.PNG

21
16
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
21
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?