S
S
Stepan2016-06-21 15:03:07
SQL Server
Stepan, 2016-06-21 15:03:07

How to use Microsoft SQL Server in Laravel 5.2?

I would just use MsSQL in Laravel 5.2 instead of MySQL. At the same time, it would be cool if you didn’t have to rewrite some sections of the code, adapt the Lara.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrzej Wielski, 2016-06-21
@KonstantinovS

Laravel ORM supports MsSQL out of the box.
To do this, it is enough to register a variable in the desired model.

class Foo extends Model {

    protected $connection = 'sqlsrv';

Write access data in config/database.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question