Skip to content

Commit

Permalink
Release v0.9.0 (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
NuwanJ authored Apr 23, 2024
1 parent dbda552 commit 2b3b997
Show file tree
Hide file tree
Showing 666 changed files with 9,105 additions and 8,767 deletions.
Empty file modified .env.example
100644 → 100755
Empty file.
Empty file modified .env.sqlite
100644 → 100755
Empty file.
Empty file modified .gitattributes
100644 → 100755
Empty file.
5 changes: 5 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/bash

echo "Git hook executing: pre-commit actions"

php artisan test -p
61 changes: 33 additions & 28 deletions .github/workflows/laravel.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
name: Laravel

on: [push, pull_request]
on: [pull_request]

jobs:
laravel-tests:

runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: |
php artisan test --colors --debug
laravel-tests:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v2

- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Generate key
run: php artisan key:generate

- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache

- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: |
php artisan test --colors --debug
31 changes: 31 additions & 0 deletions .github/workflows/laravel_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Laravel Push Test

on: [push]

jobs:
laravel-tests:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: |
php artisan test -p --colors --debug
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .php_cs
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}
Empty file modified .run/Migrate.run.xml
100644 → 100755
Empty file.
Empty file modified .run/Serve.run.xml
100644 → 100755
Empty file.
5 changes: 0 additions & 5 deletions .run/Test.run.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Test" type="PhpLocalRunConfigurationType" factoryName="PHP Console" path="$PROJECT_DIR$/artisan" scriptParameters="test">
<CommandLine>
<PhpTestInterpreterSettings>
<option name="interpreterName" value="PHP 7.4.9" />
</PhpTestInterpreterSettings>
</CommandLine>
<method v="2" />
</configuration>
</component>
Empty file modified .styleci.yml
100644 → 100755
Empty file.
14 changes: 14 additions & 0 deletions .tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "system"
},
"include": [
"resources/js/frontend/components/*"
],
"exclude": [
"node_modules"
],
"vueCompilerOptions": {
"target": "2.7"
}
}
Empty file removed Notepad.txt
Empty file.
59 changes: 35 additions & 24 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,45 @@ Laravel Boilerplate provides you with a massive head start on any size web appli
[Click here for the official documentation](http://laravel-boilerplate.com)

## Team of Developers
- [Nuwan Jaliyagoda](http://github.com/NuwanJ)

- [Nuwan Jaliyagoda](http://github.com/NuwanJ)

### Sprint 2A
- [Tharmapalan Thanujan](http://github.com/thanujan96)
- [Madhushan Ramalingam](https://github.com/DrMadhushan)
- [Thilini Madushani](http://github.com/Thilini98)

- [Tharmapalan Thanujan](http://github.com/thanujan96)
- [Madhushan Ramalingam](https://github.com/DrMadhushan)
- [Thilini Madushani](http://github.com/Thilini98)

### Sprint 3A
- [Ishan Fernando](https://github.com/ishanfdo18098)
- [Adeepa Fernando](https://github.com/NipunFernando)
- [Ridma Jayasundara ](https://github.com/ridmajayasundara)

- [Ishan Fernando](https://github.com/ishanfdo18098)
- [Adeepa Fernando](https://github.com/NipunFernando)
- [Ridma Jayasundara ](https://github.com/ridmajayasundara)

### Sprint 3B
- [Sadia Jameel](https://github.com/SaadiaJameel)
- [Sakuni Nimnadi](https://github.com/SakuniJayasinghe)
- [Thamish Wanduragala](https://github.com/Thamish99)

- [Sadia Jameel](https://github.com/SaadiaJameel)
- [Sakuni Nimnadi](https://github.com/SakuniJayasinghe)
- [Thamish Wanduragala](https://github.com/Thamish99)

### Sprint 3C
- [Karan R.](https://github.com/rasathuraikaran)
- [Gowsigan A.](https://github.com/AnnalingamGowsigan)
- [Muthuni De Alwis](https://github.com/muthuni-dealwis)

- [Karan R.](https://github.com/rasathuraikaran)
- [Gowsigan A.](https://github.com/AnnalingamGowsigan)
- [Muthuni De Alwis](https://github.com/muthuni-dealwis)

## Useful Commands and Instructions

You need to install Wamp server and run it before following commands.
Please make sure you already created database user account.

#### Install Dependencies

```
// Install PHP dependencies
composer install
// If you received mmap() error, use this command
// If you received mmap() error, use this command
// php -d memory_limit=-1 /usr/local/bin/composer install
// Update PHP dependencies
Expand All @@ -78,6 +83,9 @@ php artisan migrate
// Reset the database and seed the data
php artisan migrate:fresh --seed
// Prepare webhook for unit testing
git config --local core.hooksPath .githooks
```

#### Serve in the local environment
Expand All @@ -92,6 +100,7 @@ php artisan serve --host=0.0.0.0 --port=8000
// To work with Vue components
npm run watch
```

#### Run all above commands from bash script

```
Expand All @@ -103,6 +112,7 @@ chmod +x Start.sh
```

#### Cache and optimization

```
// Remove dev dependencies
composer install --optimize-autoloader --no-dev
Expand All @@ -116,7 +126,8 @@ php artisan route:clear
php artisan view:clear
```

#### Maintenance related commands
#### Maintenance related commands

```
php artisan down --message="{Message}" --retry=60
php artisan up
Expand Down Expand Up @@ -144,12 +155,12 @@ php artisan test -p

#### Resource Routes

| Verb | URI | Action | Route Name |
|:-----------|:---------------------------------|:---------|:-----------------------|
| GET | /photos/{photo}/comments | index | photos.comments.index |
| GET | /photos/{photo}/comments/create | create | photos.comments.create |
| POST | /photos/{photo}/comments | store | photos.comments.store |
| GET | /comments/{comment} | show | comments.show |
| GET | /comments/{comment}/edit | edit | comments.edit |
| PUT/PATCH | /comments/{comment} | update | comments.update |
| DELETE | /comments/{comment} | destroy | comments.destroy |
| Verb | URI | Action | Route Name |
| :-------- | :------------------------------ | :------ | :--------------------- |
| GET | /photos/{photo}/comments | index | photos.comments.index |
| GET | /photos/{photo}/comments/create | create | photos.comments.create |
| POST | /photos/{photo}/comments | store | photos.comments.store |
| GET | /comments/{comment} | show | comments.show |
| GET | /comments/{comment}/edit | edit | comments.edit |
| PUT/PATCH | /comments/{comment} | update | comments.update |
| DELETE | /comments/{comment} | destroy | comments.destroy |
Empty file modified Start.sh
100644 → 100755
Empty file.
Empty file modified app/Console/Kernel.php
100644 → 100755
Empty file.
18 changes: 18 additions & 0 deletions app/Domains/Announcement/Models/Announcement.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ class Announcement extends Model
'enabled' => 'boolean',
];

public static function areas()
{
return [
'frontend' => 'Frontend',
'backend' => 'Backend'
];
}

public static function types()
{
return [
'info' => 'Info',
'danger' => 'Danger',
'warning' => 'Warning',
'success' => 'Success'
];
}

/**
* Create a new factory instance for the model.
*
Expand Down
Empty file.
Empty file modified app/Domains/Announcement/Services/AnnouncementService.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/Role/RoleCreated.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/Role/RoleDeleted.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/Role/RoleUpdated.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserCreated.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserDeleted.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserDestroyed.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserLoggedIn.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserRestored.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserStatusChanged.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserUpdated.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
3 changes: 2 additions & 1 deletion app/Domains/Auth/Http/Controllers/Frontend/Auth/RegisterController.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use LangleyFoxall\LaravelNISTPasswordRules\PasswordRules;
use App\Rules\ValidateAsInternalEmail;

/**
* Class RegisterController.
Expand Down Expand Up @@ -74,7 +75,7 @@ protected function validator(array $data)
{
return Validator::make($data, [
'name' => ['required', 'string', 'max:100'],
'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users')],
'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users'), new ValidateAsInternalEmail()],
'password' => array_merge(['max:100'], PasswordRules::register($data['email'] ?? null)),
'terms' => ['required', 'in:1'],
'g-recaptcha-response' => ['required_if:captcha_status,true', new Captcha],
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/AdminCheck.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/EditabilityCheck.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/PasswordExpires.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/SuperAdminCheck.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/ToBeLoggedOut.php
100644 → 100755
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/UserCheck.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/UserTypeCheck.php
100644 → 100755
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Http/Requests/Backend/Role/EditRoleRequest.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Http/Requests/Backend/User/EditUserRequest.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Listeners/RoleEventListener.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Listeners/UserEventListener.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/PasswordHistory.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Permission.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Role.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Attribute/RoleAttribute.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Attribute/UserAttribute.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Method/RoleMethod.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Method/UserMethod.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Scope/PermissionScope.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Scope/RoleScope.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Scope/UserScope.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/User.php
100644 → 100755
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Notifications/Frontend/VerifyEmail.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Observers/UserObserver.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Rules/UnusedPassword.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Services/PermissionService.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Services/RoleService.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Services/UserService.php
100644 → 100755
Empty file.
Empty file modified app/Exceptions/GeneralException.php
100644 → 100755
Empty file.
Empty file modified app/Exceptions/Handler.php
100644 → 100755
Empty file.
Empty file modified app/Exceptions/ReportableException.php
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions app/Helpers/Global/GeneralHelper.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Carbon\Carbon;

if (! function_exists('appName')) {
if (!function_exists('appName')) {
/**
* Helper to grab the application name.
*
Expand All @@ -14,7 +14,7 @@ function appName()
}
}

if (! function_exists('carbon')) {
if (!function_exists('carbon')) {
/**
* Create a new Carbon instance from a time.
*
Expand All @@ -29,7 +29,7 @@ function carbon($time)
}
}

if (! function_exists('homeRoute')) {
if (!function_exists('homeRoute')) {
/**
* Return the route to the "home" page depending on authentication/authorization status.
*
Expand All @@ -43,7 +43,7 @@ function homeRoute()
}

if (auth()->user()->isUser()) {
return 'frontend.user.dashboard';
return 'frontend.user.overview';
}
}

Expand Down
Empty file modified app/Helpers/Global/HtmlHelper.php
100644 → 100755
Empty file.
Empty file modified app/Helpers/Global/LocaleHelper.php
100644 → 100755
Empty file.
Empty file modified app/Helpers/Global/SystemHelper.php
100644 → 100755
Empty file.
Empty file modified app/Helpers/Global/TimezoneHelper.php
100644 → 100755
Empty file.
Empty file modified app/Helpers/Global/_readme.txt
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Api/Auth/AuthController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Api/Auth/OrderController.php
100644 → 100755
Empty file.
Loading

0 comments on commit 2b3b997

Please sign in to comment.