Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 4575f1b

Browse files
committed
Formatting tweaks
1 parent 0c39d61 commit 4575f1b

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

docs/quick-start.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,72 +8,72 @@ This guide was created with the help of [@st-claude](https://github.com/st-claud
88
1. Create a new laravel project by running the command:
99
- `laravel new my-app`
1010

11-
Or (if you don't have the Laravel installer)
11+
Or (if you don't have the [Laravel Installer](https://laravel.com/docs/5.2#installation))
1212

1313
- `composer create-project --prefer-dist laravel/laravel my-app`.
14-
15-
[Laravel Installation](https://laravel.com/docs/5.2#installation)
1614

17-
2. Open up your `composer.json` file and insert the following in the `require: {}` array:
18-
- `"adldap2/adldap2-laravel": "3.0.*"`
15+
2. Run the following command to install Adldap2-Laravel:
1916

20-
3. Run the `composer update` command in the root directory of your project to pull in Adldap2 and its dependencies.
17+
- `composer require adldap2-laravel`
2118

22-
4. Create a new database in your desired database interface (such as PhpMyAdmin, MySQL Workbench, command line etc.)
19+
3. Create a new database in your desired database interface (such as PhpMyAdmin, MySQL Workbench, command line etc.)
2320

24-
5. Enter your database details and credentials inside the `.env` file located in your project root directory (if there is not one there, rename the `.env.example` to `.env`).
21+
4. Enter your database details and credentials inside the `.env` file located in your project root directory (if there is not one there, rename the `.env.example` to `.env`).
2522

26-
6. If you're using username's to login users **instead** of their emails, you will need to change
23+
5. If you're using username's to login users **instead** of their emails, you will need to change
2724
the default `email` column in `database/migrations/2014_10_12_000000_create_users_table.php`.
2825

29-
```php
30-
// database/migrations/2014_10_12_000000_create_users_table.php
31-
32-
Schema::create('users', function (Blueprint $table) {
33-
$table->increments('id');
34-
$table->string('name');
35-
36-
// From:
37-
$table->string('email')->unique();
38-
39-
// To:
40-
$table->string('username')->unique();
41-
42-
$table->string('password');
43-
$table->rememberToken();
44-
$table->timestamps();
45-
});
46-
```
26+
```php
27+
// database/migrations/2014_10_12_000000_create_users_table.php
28+
29+
Schema::create('users', function (Blueprint $table) {
30+
$table->increments('id');
31+
$table->string('name');
32+
33+
// From:
34+
$table->string('email')->unique();
35+
36+
// To:
37+
$table->string('username')->unique();
38+
39+
$table->string('password');
40+
$table->rememberToken();
41+
$table->timestamps();
42+
});
43+
```
4744

48-
7. Now run `php artisan migrate`.
45+
6. Now run `php artisan migrate`.
46+
47+
7. Insert the following service providers in your `config/app.php` file (in the `providers` array):
4948

50-
8. Insert the following service providers in your `config/app.php` file (in the `providers` array):
49+
> **Note**: This step is only required for Laravel 5.0 - 5.4.
50+
> They are registered automatically in Laravel 5.5.
5151

5252
```php
5353
Adldap\Laravel\AdldapServiceProvider::class,
5454
Adldap\Laravel\AdldapAuthServiceProvider::class,
5555
```
5656

57-
9. Now, insert the facade into your `config/app.php` file (in the `aliases` array):
57+
8. Now, insert the facade into your `config/app.php` file (in the `aliases` array):
5858

5959
```php
6060
'Adldap' => Adldap\Laravel\Facades\Adldap::class,
6161
```
6262

6363
> **Note**: Insertion of this alias in your `app.php` file isn't necessary unless you're planning on utilizing it.
6464
65-
10. Now run `php artisan vendor:publish` in your root project directory to publish Adldap2's configuration files.
65+
9. Now run `php artisan vendor:publish` in your root project directory to publish Adldap2's configuration files.
6666

6767
* Two files will be published inside your `config` folder, `adldap.php` and `adldap_auth.php`.
6868

69-
11. Modify the `config/adldap.php` file for your AD server configuration.
69+
10. Modify the `config/adldap.php` file for your AD server configuration.
7070

71-
12. Run the command `php artisan make:auth` to scaffold authentication controllers and routes.
71+
11. Run the command `php artisan make:auth` to scaffold login controllers and routes.
7272

73-
13. If you require logging in by another attribute, such as a username instead of email follow
73+
12. If you require logging in by another attribute, such as a username instead of email follow
7474
the process below for your Laravel version. Otherwise ignore this step.
7575

76-
* **Laravel <= 5.2**
76+
**Laravel <= 5.2**
7777

7878
Inside the generated `app/Http/Controllers/Auth/AuthController.php`, you'll need to add the `protected $username` property if you're logging in users by username.
7979

@@ -83,7 +83,7 @@ the process below for your Laravel version. Otherwise ignore this step.
8383
protected $username = 'username';
8484
```
8585

86-
* **Laravel > 5.3**
86+
**Laravel > 5.3**
8787

8888
Inside the generated `app/Http/Controllers/Auth/LoginController.php`, you'll need to add the public method `username()`:
8989

@@ -94,7 +94,7 @@ the process below for your Laravel version. Otherwise ignore this step.
9494
}
9595
```
9696

97-
14. Now insert a new auth driver inside your `config/auth.php` file:
97+
13. Now insert a new auth driver inside your `config/auth.php` file:
9898

9999
```php
100100
'providers' => [
@@ -105,7 +105,7 @@ the process below for your Laravel version. Otherwise ignore this step.
105105
],
106106
```
107107

108-
15. Inside your `resources/views/auth/login.blade.php` file, if you're requiring the user logging in by username, you'll
108+
14. Inside your `resources/views/auth/login.blade.php` file, if you're requiring the user logging in by username, you'll
109109
need to modify the HTML input to `username` instead of `email`. Ignore this step otherwise.
110110

111111
From:
@@ -119,8 +119,8 @@ the process below for your Laravel version. Otherwise ignore this step.
119119
<input type="text" class="form-control" name="username" value="{{ old('username') }}">
120120
```
121121

122-
16. You should now be able to login to your Laravel application using LDAP authentication! If you check out your database
122+
15. You should now be able to login to your Laravel application using LDAP authentication! If you check out your database
123123
in your `users` table, you'll see that your LDAP account was synchronized to a local user account. This means that
124124
you can attach data regularly to this user as you would with standard Laravel authentication.
125125

126-
17. Congratulations, you're awesome.
126+
16. Congratulations, you're awesome.

0 commit comments

Comments
 (0)