Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: laravel/jetstream
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.2
Choose a base ref
...
head repository: laravel/jetstream
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.0.3
Choose a head ref
  • 3 commits
  • 4 files changed
  • 2 contributors

Commits on Sep 1, 2020

  1. Update CHANGELOG.md

    driesvints committed Sep 1, 2020
    Copy the full SHA
    ceee116 View commit details
  2. update readme

    taylorotwell committed Sep 1, 2020
    Copy the full SHA
    ca060fa View commit details
  3. update guard usage

    taylorotwell committed Sep 1, 2020
    Copy the full SHA
    e871b88 View commit details
Showing with 18 additions and 6 deletions.
  1. +7 −1 CHANGELOG.md
  2. +3 −1 README.md
  3. +4 −2 src/Http/Controllers/Inertia/CurrentUserController.php
  4. +4 −2 src/Http/Livewire/DeleteUserForm.php
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Release Notes

## [Unreleased](https://github.com/laravel/jetstream/compare/v0.0.1...1.x)
## [Unreleased](https://github.com/laravel/jetstream/compare/v0.0.2...master)


## [v0.0.2 (2020-09-01)](https://github.com/laravel/jetstream/compare/v0.0.1...v0.0.2)

### Changed
- Require Sanctum 2.6 ([#2](https://github.com/laravel/jetstream/pull/2))


## v0.0.1 (2020-08-31)
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -17,7 +17,9 @@

## Introduction

Coming soon...
Laravel Jetstream is a beautifully designed application scaffolding for Laravel. Jetstream provides the perfect starting point for your next and includes login, registration, email verification, two-factor authentication, session management, API support via [Laravel Sanctum](https://github.com/laravel/sanctum), and optional team management.

Jetstream is designed using [Tailwind CSS](https://tailwindcss.com) and offers your choice of [Livewire](https://laravel-livewire.com) or [Inertia](https://inertiajs.com) scaffolding.

## Official Documentation

6 changes: 4 additions & 2 deletions src/Http/Controllers/Inertia/CurrentUserController.php
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

namespace Laravel\Jetstream\Http\Controllers\Inertia;

use Illuminate\Contracts\Auth\StatefulGuard;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Auth;
@@ -13,13 +14,14 @@ class CurrentUserController extends Controller
* Delete the current user.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Contracts\Auth\StatefulGuard $auth
* @return \Illuminate\Http\RedirectResponse
*/
public function destroy(Request $request)
public function destroy(Request $request, StatefulGuard $auth)
{
app(DeletesUsers::class)->delete($request->user()->fresh());

Auth::logout();
$auth->logout();

return response('', 409)->header('X-Inertia-Location', url('/'));
}
6 changes: 4 additions & 2 deletions src/Http/Livewire/DeleteUserForm.php
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

namespace Laravel\Jetstream\Http\Livewire;

use Illuminate\Contracts\Auth\StatefulGuard;
use Illuminate\Support\Facades\Auth;
use Laravel\Jetstream\Contracts\DeletesUsers;
use Livewire\Component;
@@ -19,13 +20,14 @@ class DeleteUserForm extends Component
* Delete the current user.
*
* @param \Laravel\Jetstream\Contracts\DeletesUsers $deleter
* @param \Illuminate\Contracts\Auth\StatefulGuard $auth
* @return void
*/
public function deleteUser(DeletesUsers $deleter)
public function deleteUser(DeletesUsers $deleter, StatefulGuard $auth)
{
$deleter->delete(Auth::user()->fresh());

Auth::logout();
$auth->logout();

return redirect('/');
}