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
<?php | |
namespace App\Modules\Core\Http\Controllers; | |
use App\Models\Item; | |
use App\Models\Permission; | |
use App\Models\projDesign; | |
use App\Models\Rma; | |
use App\Models\Task; | |
use App\Modules\Core\Http\Requests\CommentRequest; |
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
<?php | |
public function store( | |
$data, | |
User $userModel, | |
Logger $activityLogger, | |
Mailer $mailer | |
) | |
{ | |
// valdating the user data | |
if ($data['first_name'] || $data['email']) { |
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
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Builder; | |
class DeleteUnnecessaryTablesFromDatabase extends Migration | |
{ | |
/** |
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
version: '3' | |
services: | |
app: | |
build: | |
context: . | |
dockerfile: .docker/Dockerfile | |
image: laravel-docker | |
ports: | |
- 8080:80 | |
# specify a path on the host machine to map the |
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
I was following this one.. | |
https://docs.docker.com/get-started/part2/#introduction | |
============================================= | |
Dockerfile | |
# Use an official python runtime as a parent image. | |
FROM python:2.7-slim | |
# set the working directory to /app | |
WORKDIR /app |
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
export default { | |
['GET'](state, notes) { | |
state.notes = notes; | |
}, | |
['GET_FAVOURITE'](state, notes) { | |
// mutation definition | |
}, | |
} |
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
// const RESOURCE_NOTE = 'api/notes'; | |
export default { | |
getAll({commit}) { | |
return axios.get(RESOURCE_NOTE) | |
.then((response) => { | |
commit('GET', response.data); | |
}) | |
.catch(); | |
}, |
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
const state = { | |
notes: [], | |
favouriteNotes: [], | |
}; | |
export default state; |
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
const router = new VueRouter({ | |
routes, | |
}); | |
const userApp = new Vue({ | |
router, | |
store, | |
}); | |
userApp.$mount('#app'); |
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
![](http://res.cloudinary.com/coderjay/image/upload/v1520992200/vue.png)| | |
|:--:| | |
| Image Courtesy https://vuejobs.com | | |
# Using Vue Router, Vuex in modular Applications (Laravel). | |
Hey everyone, some time ago I wrote an article on [using vuex, vue router with laravel](https://medium.com/introcept-hub/using-vue-vuex-vue-router-with-laravel-2c0962c97416). Since this is a kind of sequel to it, I strongly recommend you all get to the article and read it once. | |
It would be terrible to watch second episode of [Games of thrones](https://en.wikipedia.org/wiki/Game_of_Thrones) without watching the first one right? :wink: |
NewerOlder