-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c2aaeb8
Showing
28 changed files
with
790 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Path-based git attributes | ||
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html | ||
|
||
# Ignore all test and documentation with "export-ignore". | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/.php_cs.dist export-ignore | ||
/.github export-ignore | ||
/psalm.xml export-ignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.idea | ||
.php_cs | ||
.php_cs.cache | ||
.phpunit.result.cache | ||
build | ||
composer.lock | ||
coverage | ||
docs | ||
phpunit.xml | ||
psalm.xml | ||
vendor | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
$finder = Symfony\Component\Finder\Finder::create() | ||
->notPath('bootstrap/*') | ||
->notPath('storage/*') | ||
->notPath('resources/view/mail/*') | ||
->in([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]) | ||
->name('*.php') | ||
->notName('*.blade.php') | ||
->ignoreDotFiles(true) | ||
->ignoreVCS(true); | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@PSR2' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'ordered_imports' => ['sortAlgorithm' => 'alpha'], | ||
'no_unused_imports' => true, | ||
'not_operator_with_successor_space' => true, | ||
'trailing_comma_in_multiline_array' => true, | ||
'phpdoc_scalar' => true, | ||
'unary_operator_spaces' => true, | ||
'binary_operator_spaces' => true, | ||
'blank_line_before_statement' => [ | ||
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], | ||
], | ||
'phpdoc_single_line_var_spacing' => true, | ||
'phpdoc_var_without_name' => true, | ||
'method_argument_space' => [ | ||
'on_multiline' => 'ensure_fully_multiline', | ||
'keep_multiple_spaces_after_comma' => true, | ||
] | ||
]) | ||
->setFinder($finder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
|
||
All notable changes to `fortify-ui-preset` will be documented in this file | ||
|
||
## 1.0.0 - 202X-XX-XX | ||
|
||
- initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) Your Name <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<p align="center"><img width="400" src="https://github.com/zacksmash/fortify-ui-preset/raw/master/fortify-preset-image.png"></p> | ||
|
||
# Using this template | ||
|
||
Here are the steps to customize this template with your preset | ||
|
||
- Rename the files in the `src` directory. Example `FortifyUIBootstrapCommand.php` | ||
- Make sure you update any `use` statements and namespaces | ||
- Add your preset stubs to the `stubs` directory | ||
- Add your preset image and preset screenshots | ||
- Update the `composer.json` | ||
- Replace all instances of `YourNamespace\\FortifyUIPreset` with your details. For example: `SomeDude\\FortifyUIBootstrap` | ||
- Search & Replace all of the following terms | ||
- YourNamespace | ||
- yournamespace | ||
- YourPreset | ||
- yourpreset | ||
- SomeFramework | ||
- Your Name | ||
- yourusername | ||
- [email protected] | ||
|
||
|
||
# Introduction | ||
|
||
**YourPreset** is a Laravel Fortify UI preset, built with SomeFramework. | ||
|
||
- [Requirements](#requirements) | ||
- [Installation](#installation) | ||
|
||
<a name="requirements"></a> | ||
## Requirements | ||
|
||
This package requires Laravel Fortify and FortifyUI. Installing [*FortifyUI*](https://github.com/zacksmash/fortify-ui) will automatically install and configure Laravel Fortify for you, so you may start there. | ||
|
||
<a name="installation"></a> | ||
## Installation | ||
|
||
To get started, you'll need to install **YourPreset** using Composer. | ||
|
||
```bash | ||
composer require yournamespace/fortify-yourpreset | ||
``` | ||
|
||
Next, you'll need to run the install command: | ||
|
||
```bash | ||
php artisan fortify-ui:yourpreset | ||
``` | ||
|
||
This command will publish **YourPreset's** views and resources to your project. | ||
|
||
- All `auth` views | ||
- Other files... | ||
|
||
<p align="center"><img src="https://github.com/zacksmash/fortify-ui-preset/raw/master/fortify-preset-screenshot.png"></p> | ||
|
||
## License | ||
|
||
**FortifyUIPreset** is open-sourced software licensed under the [MIT license](LICENSE.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"name": "yournamespace/fortify-yourpreset", | ||
"description": "Fortify-driven Laravel UI replacement", | ||
"keywords": [ | ||
"fortify-ui" | ||
], | ||
"homepage": "https://github.com/yourusername/fortify-yourpreset", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Your Name", | ||
"email": "[email protected]", | ||
"homepage": "https://yourusername.github.io", | ||
"role": "Developer" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.4", | ||
"illuminate/contracts": "^8.0", | ||
"zacksmash/fortify-ui": "^1.0" | ||
}, | ||
"require-dev": { | ||
"friendsofphp/php-cs-fixer": "^2.16", | ||
"orchestra/testbench": "^6.0", | ||
"phpunit/phpunit": "^9.3", | ||
"vimeo/psalm": "^3.11" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"YourNamespace\\FortifyUIPreset\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"YourNamespace\\FortifyUIPreset\\Tests\\": "tests" | ||
} | ||
}, | ||
"scripts": { | ||
"psalm": "vendor/bin/psalm", | ||
"test": "vendor/bin/phpunit --colors=always", | ||
"test-coverage": "vendor/bin/phpunit --coverage-html coverage", | ||
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes" | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"YourNamespace\\FortifyUIPreset\\FortifyUIPresetServiceProvider" | ||
] | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
verbose="true" | ||
> | ||
<testsuites> | ||
<testsuite name="YourNamespace Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">./src</directory> | ||
</include> | ||
<report> | ||
<html outputDirectory="build/coverage"/> | ||
<text outputFile="build/coverage.txt"/> | ||
<clover outputFile="build/logs/clover.xml"/> | ||
</report> | ||
</coverage> | ||
<logging> | ||
<junit outputFile="build/report.junit.xml"/> | ||
</logging> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
errorLevel="4" | ||
findUnusedVariablesAndParams="true" | ||
resolveFromConfigFile="true" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
> | ||
<projectFiles> | ||
<directory name="src"/> | ||
<ignoreFiles> | ||
<directory name="vendor"/> | ||
</ignoreFiles> | ||
</projectFiles> | ||
</psalm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace YourNamespace\FortifyUIPreset\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
|
||
class FortifyUIPresetCommand extends Command | ||
{ | ||
public $signature = 'fortify-ui:yourpreset'; | ||
|
||
public $description = 'Install YourPreset with views and resources'; | ||
|
||
public function handle() | ||
{ | ||
$this->publishAssets(); | ||
|
||
$this->comment('YourPreset is now installed.'); | ||
} | ||
|
||
protected function publishAssets() | ||
{ | ||
$this->callSilent('vendor:publish', ['--tag' => 'fortify-ui-preset-resources', '--force' => true]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace YourNamespace\FortifyUIPreset; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
use YourNamespace\FortifyUIPreset\Commands\FortifyUIPresetCommand; | ||
|
||
class FortifyUIPresetServiceProvider extends ServiceProvider | ||
{ | ||
public function boot() | ||
{ | ||
if ($this->app->runningInConsole()) { | ||
$this->publishes([ | ||
__DIR__ . '/../stubs/resources/views' => base_path('resources/views'), | ||
// Add more resources here | ||
], 'fortify-ui-preset-resources'); | ||
|
||
$this->commands([ | ||
FortifyUIPresetCommand::class, | ||
]); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@extends('layouts.app') | ||
|
||
@section('content') | ||
@if ($errors->any()) | ||
<div> | ||
<div>{{ __('Whoops! Something went wrong.') }}</div> | ||
|
||
<ul> | ||
@foreach ($errors->all() as $error) | ||
<li>{{ $error }}</li> | ||
@endforeach | ||
</ul> | ||
</div> | ||
@endif | ||
|
||
<form method="POST" action="{{ route('password.confirm') }}"> | ||
@csrf | ||
|
||
<div> | ||
<label>{{ __('Password') }}</label> | ||
<input type="password" name="password" required autocomplete="current-password" /> | ||
</div> | ||
|
||
<div> | ||
<button type="submit"> | ||
{{ __('Confirm Password') }} | ||
</button> | ||
</div> | ||
|
||
@if (Route::has('password.request')) | ||
<a href="{{ route('password.request') }}"> | ||
{{ __('Forgot Your Password?') }} | ||
</a> | ||
@endif | ||
</form> | ||
@endsection |
Oops, something went wrong.