Skip to content

Commit

Permalink
created resources dir and removed npm dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
buzkall committed Aug 9, 2019
1 parent 42b5ccd commit d48b586
Show file tree
Hide file tree
Showing 8 changed files with 2,669 additions and 16 deletions.
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,25 @@ Laravel package used to write letters to you future self, that will be delivered

## Installation

Install via composer:
1. Install via composer:
```
composer require buzkall/future-letters
```

```
composer require buzkall/future-letters
```
2. Publish files

```
php artisan vendor:publish --provider='Buzkall\FutureLetters\FutureLettersServiceProvider'
```

3. Run

```
php artisan make:auth
php artisan migrate
```

Run migrations, register a user, log in and go to /future-letters
4. Register a user, log in and go to /future-letters

<br/>

Expand All @@ -20,12 +32,7 @@ php artisan db:seed --class=Buzkall\\FutureLetters\\FutureLetterSee
```

<br/>
You can modify the views publishing them:

```
php artisan vendor:publish
```

You can modify the views which have been copied to the views directory then publishing

<p align="center">
<img src="https://i.imgur.com/akuneKQr.png" alt="teachable_schema">
Expand Down
7 changes: 5 additions & 2 deletions src/FutureLettersServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ public function boot()
$this->loadMigrationsFrom(__DIR__ . '/migrations');
$this->app->make('Illuminate\Database\Eloquent\Factory')->load(__DIR__ . '/factories');

$this->loadViewsFrom(__DIR__ . '/views', 'future-letters');
$this->loadViewsFrom(__DIR__ . '/resources/views', 'future-letters');
// publish the views in case the user wants to override them
$this->publishes([__DIR__ . '/views' => base_path('resources/views/buzkall/future-letters')]);
$this->publishes(
[__DIR__ . '/resources/views' => base_path('resources/views/buzkall/future-letters'),
__DIR__ . '/resources/js' => public_path('js'),
]);

if ($this->app->runningInConsole()) {
$this->commands([SendFutureLetters::class]);
Expand Down
2,636 changes: 2,636 additions & 0 deletions src/resources/js/bootstrap-datetimepicker.js

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions src/views/app.blade.php → src/resources/views/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

<title>@yield('title') {{config('app.name')}} @show</title>

<link rel="stylesheet" href={{mix('css/app.css')}}>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css">
<link rel="stylesheet" href={{ asset('css/app.css') }}>

</head>
<body>
Expand Down Expand Up @@ -65,8 +68,12 @@
@yield('content')
</div>

<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src={{mix('js/app.js')}}></script>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>

<script type="text/javascript" src={{ asset('js/app.js') }}></script>
<script type="text/javascript" src={{ asset('js/bootstrap-datetimepicker.js') }}></script>

@yield('scripts_footer')
@yield('scripts_footer_include')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d48b586

Please sign in to comment.