Subiendo proyecto completo sin restricciones de git ignore

This commit is contained in:
Jose Sanchez
2023-08-17 11:44:02 -04:00
parent a0d4f5ba3b
commit 20f1c60600
19921 changed files with 2509159 additions and 45 deletions

View File

@@ -0,0 +1,24 @@
/vendor/
node_modules/
npm-debug.log
yarn-error.log
# Laravel 4 specific
bootstrap/compiled.php
app/storage/
# Laravel 5 & Lumen specific
public/storage
public/hot
# Laravel 5 & Lumen specific with changed public path
public_html/storage
public_html/hot
storage/*.key
.env
Homestead.yaml
Homestead.json
/.vagrant
.phpunit.result.cache
/composer.lock

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 GeneaLabs, LLC
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.

View File

@@ -0,0 +1,12 @@
# laravel-overridable-model
Provide a uniform method of allowing models to be overridden in Laravel.
## Installation
```sh
composer require genealabs/laravel-overridable-model
```
## Usage
### Contract
### Trait

View File

@@ -0,0 +1,23 @@
{
"name": "genealabs/laravel-overridable-model",
"description": "Provide a uniform method of allowing models to be overridden in Laravel.",
"keywords": [
"laravel",
"nova"
],
"license": "MIT",
"require": {
"illuminate/support": "^9.0",
"symfony/thanks": "^1.2"
},
"autoload": {
"psr-4": {
"GeneaLabs\\LaravelOverridableModel\\": "src/"
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
<description>GeneaLabs coding standards.</description>
<rule ref="PSR1"></rule>
<rule ref="PSR2"></rule>
<rule ref="PSR12">
<exclude name="PSR12.Classes.ClassInstantiation.MissingParentheses"/>
<exclude name="PSR12.Functions.ReturnTypeDeclaration.SpaceBeforeColon"/>
</rule>
</ruleset>

View File

@@ -0,0 +1,11 @@
<?php
namespace GeneaLabs\LaravelOverridableModel\Contracts;
interface OverridableModel
{
public static function ignoreMigrations() : void;
public static function runsMigrations() : bool;
public static function useModel(string $model) : void;
public static function model() : string;
}

View File

@@ -0,0 +1,31 @@
<?php
namespace GeneaLabs\LaravelOverridableModel\Traits;
trait Overridable
{
protected static $ignoreMigrations = false;
protected static $modelClassName = self::class;
public static function ignoreMigrations() : void
{
self::$ignoreMigrations = true;
}
public static function model() : string
{
return self::$modelClassName
?? self::class;
}
public static function runsMigrations() : bool
{
return ! self::$ignoreMigrations
?? true;
}
public static function useModel(string $model) : void
{
self::$modelClassName = $model;
}
}